Content adaptive gain compensated prediction for next generation video coding

ABSTRACT

Techniques related to content adaptive gain compensated prediction for next generation video coding are described.

RELATED APPLICATIONS

The present application claims the benefit of the international application no. PCT/US2013/078114, filed 27 Dec. 2013, the disclosure of which is expressly incorporated herein in its entirety for all purposes.

BACKGROUND

A video encoder compresses video information so that more information can be sent over a given bandwidth. The compressed signal may then be transmitted to a receiver having a decoder that decodes or decompresses the signal prior to display.

High Efficient Video Coding (HEVC) is the latest video compression standard, which is being developed by the Joint Collaborative Team on Video Coding (JCT-VC) formed by ISO/IEC Moving Picture Experts Group (MPEG) and ITU-T Video Coding Experts Group (VCEG). HEVC is being developed in response to the previous H.264/AVC (Advanced Video Coding) standard not providing enough compression for evolving higher resolution video applications. Similar to previous video coding standards, HEVC includes basic functional modules such as intra/inter prediction, transform, quantization, in-loop filtering, and entropy coding.

The ongoing HEVC standard may attempt to improve on limitations of the H.264/AVC standard such as limited choices for allowed prediction partitions and coding partitions, limited allowed multiple references and prediction generation, limited transform block sizes and actual transforms, limited mechanisms for reducing coding artifacts, and inefficient entropy encoding techniques. However, the ongoing HEVC standard may use iterative approaches to solving such problems.

For instance, with ever increasing resolution of video to be compressed and expectation of high video quality, the corresponding bitrate/bandwidth required for coding using existing video coding standards such as H.264 or even evolving standards such as H.265/HEVC, is relatively high. The aforementioned standards use expanded forms of traditional approaches to implicitly address the insufficient compression/quality problem, but often the results are limited.

The present description, developed within the context of a Next Generation Video (NGV) codec project, addresses the general problem of designing an advanced video codec that maximizes the achievable compression efficiency while remaining sufficiently practical for implementation on devices. For instance, with ever increasing resolution of video and expectation of high video quality due to availability of good displays, the corresponding bitrate/bandwidth required using existing video coding standards such as earlier MPEG standards and even the more recent H.264/AVC standard, is relatively high. H.264/AVC was not perceived to be providing high enough compression for evolving higher resolution video applications.

BRIEF DESCRIPTION OF THE DRAWINGS

The material described herein is illustrated by way of example and not by way of limitation in the accompanying figures. For simplicity and clarity of illustration, elements illustrated in the figures are not necessarily drawn to scale. For example, the dimensions of some elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference labels have been repeated among the figures to indicate corresponding or analogous elements. In the figures:

FIG. 1 is an illustrative diagram of an example next generation video encoder;

FIG. 2 is an illustrative diagram of an example next generation video decoder;

FIG. 3(a) is an illustrative diagram of an example next generation video encoder and subsystems;

FIG. 3(b) is an illustrative diagram of an example next generation video decoder and subsystems;

FIG. 4 is an illustrative diagram of modified prediction reference pictures;

FIG. 5 is a diagram of a frame sequence for explaining a method of providing super-resolution synthesized reference frames;

FIG. 6 is an illustrative diagram of an example encoder subsystem;

FIG. 7 is an illustrative diagram of an example decoder subsystem;

FIG. 8 is an illustrative diagram of an example encoder prediction subsystem;

FIG. 9 is an illustrative diagram of an example decoder prediction subsystem;

FIGS. 10-11 showing frames with brightness changes;

FIGS. 12-13 showing frames with brightness changes;

FIGS. 14-15 showing frames with brightness changes;

FIGS. 16-17 showing frames with brightness changes;

FIGS. 18-19 showing frames with brightness changes;

FIGS. 20-21 showing frames with brightness changes;

FIG. 22 is a flow chart of a method of performing compensation of inter-frame changes in brightness;

FIG. 23 is a flow chart of another method of gain compensation to modify reference frames;

FIG. 24 is a flow chart of a detailed method of gain compensation to modify reference frames;

FIG. 25 are partition patterns for gain compensation;

FIG. 26 is a codebook table of partition pattern index numbers and the size and arrangement of the partitions;

FIG. 27 is a diagram of a gain compensation logic for calculating gain and offset values;

FIG. 28 is a diagram of another gain compensation logic for calculating gain and offset values;

FIGS. 29A-29B is a table of partition pattern effectiveness using sum of absolute differences (SAD);

FIGS. 30A-30B is a table for quantization of gain parameter a to eight bits;

FIGS. 31A-31B is table for quantization of luma offset parameter b to eight bits;

FIG. 32 is a diagram of a gain compensation subsystem at an encoder;

FIG. 33 is a diagram of a gain compensation subsystem at a decoder;

FIG. 34 is a diagram of an example video coding system and video coding process in operation.

FIG. 35 is an illustrative diagram of an example video coding system;

FIG. 36 is an illustrative diagram of an example system; and

FIG. 37 illustrates an example device.

DETAILED DESCRIPTION

One or more implementations are now described with reference to the enclosed figures. While specific configurations and arrangements are discussed, it should be understood that this is done for illustrative purposes only. Persons skilled in the relevant art will recognize that other configurations and arrangements may be employed without departing from the spirit and scope of the description. It will be apparent to those skilled in the relevant art that techniques and/or arrangements described herein may also be employed in a variety of other systems and applications other than what is described herein.

While the following description sets forth various implementations that may be manifested in architectures such as system-on-a-chip (SoC) architectures for example, implementation of the techniques and/or arrangements described herein are not restricted to particular architectures and/or computing systems and may be implemented by any architecture and/or computing system for similar purposes. For instance, various architectures employing, for example, multiple integrated circuit (IC) chips and/or packages, and/or various computing devices and/or consumer electronic (CE) devices such as set top boxes, smart phones, etc., may implement the techniques and/or arrangements described herein. Further, while the following description may set forth numerous specific details such as logic implementations, types and interrelationships of system components, logic partitioning/integration choices, etc., claimed subject matter may be practiced without such specific details. In other instances, some material such as, for example, control structures and full software instruction sequences, may not be shown in detail in order not to obscure the material disclosed herein.

The material disclosed herein may be implemented in hardware, firmware, software, or any combination thereof. The material disclosed herein may also be implemented as instructions stored on a machine-readable medium, which may be read and executed by one or more processors. A machine-readable medium may include any medium and/or mechanism for storing or transmitting information in a form readable by a machine (e.g., a computing device). For example, a machine-readable medium may include read only memory (ROM); random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; electrical, optical, acoustical or other forms of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.); and others.

References in the specification to “one implementation”, “an implementation”, “an example implementation”, etc., indicate that the implementation described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same implementation. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other implementations whether or not explicitly described herein.

Systems, apparatus, articles, and methods are described below related to gain compensation prediction for video coding.

As discussed above, the H.264/AVC coding standard while it represents improvement over past MPEG standards, it is still very limiting in choices of prediction due to the following reasons: the choices for allowed prediction partitions are very limited; the accuracy of prediction for prediction partitions is limited; and the allowed multiple references predictions are very limited as they are discrete based on past decoded frames rather than accumulation of resolution over many frames. The aforementioned limitations of the state of the art standards such as H.264 are recognized by the ongoing work in HEVC that uses an iterative approach to fixing these limitations.

Further, the problem of improved prediction is currently being solved in an ad hoc manner by using decoded multiple references in the past and/or future for motion compensated prediction in inter-frame coding of video. This is done with the hope that in the past or future frames, there might be some more similar areas to the area of current frame being predicted than in the past frame (for P-pictures/slices), or in the past and future frames (for B-pictures/slices).

As will be described in greater detail below, some forms of prediction, such as the gain compensation prediction procedures of this disclosure, may not be supportable by existing standards. The present disclosure was developed within the context of Next Generation Video (NGV) codec project to addresses the problem of designing a new video coding scheme that maximizes compression efficiency while remaining practical for implementation on devices. Specifically, a new type of prediction is disclosed herein called locally adaptive gain compensated prediction (or simply gain compensation prediction) that compensates for local changes in brightness in video scenes (providing improved prediction which in turn reduces prediction error) improving the overall video coding efficiency.

More specifically, techniques described herein may differ from standards based approaches as it naturally incorporates significant content based adaptivity in video coding process to achieve higher compression. By comparison, standards based video coding approaches typically tend to squeeze higher gains by adaptations and fine tuning of legacy approaches. For instance, all standards based approaches heavily rely on adapting and further tweaking of motion compensated interframe coding as the primary means to reduce prediction differences to achieve gains. On the other hand, some video coding implementations disclosed herein, in addition to exploiting interframe differences due to motion, also exploits other types of interframe differences (gain, blur, registration) that naturally exist in typical video scenes, as well as prediction benefits of frames synthesized from past decoded frames only or a combination of past and future decoded frames. In some video coding implementations disclosed herein, the synthesized frames used for prediction include Dominant Motion Compensated (DMC) frames, Super Resolution (SR) frames, and PI (Projected Interpolation) frames. Besides the issue of exploiting other sources of interframe differences besides motion, some video coding implementations disclosed herein differ from standards in other ways as well.

With regard to gain compensation, apart from changes in brightness caused by motion, sometimes sudden changes in brightness can be global due to editing effects such as a fade-in, a fade-out, or due to a crossfade. However, in many more cases, such changes in brightness are local for instance due to flickering lights, camera flashes, explosions, colored strobe lights in a dramatic or musical performance, and so forth, with examples shown on FIGS. 10-21. In the past, only techniques for global brightness changes have been disclosed, in contrast to local compensation brightness changes which have not been successfully addressed.

The compensation of brightness in conjunction with compression also poses additional problems. Whether global or local, the compensation of brightness for efficient compression is applied both at encoder and decoder and as such, brightness change parameters (gain and offset) should be efficiently communicated with low bit-cost from an encoder to a decoder via the bitstream. The processing at an encoder and decoder should be of low complexity as well. For the case of global change in brightness, one set of parameters (for example, the best fit) for a frame determined at the encoder should be communicated from encoder to decoder. This arrangement is still more efficient and uses less complex processing than locally varying brightness changes at the decoder by sending multiple, alternative, brightness change parameters for a frame to determine the best parameters to use at the decoder as well as some sort of map (which may be overhead intensive).

These difficulties are addressed by the new and innovative approaches used by a NGV video coding system including improved prediction by locally adaptive compensation of gain described herein. By compensating for changes in brightness caused by fades, flickering lights, camera flashes, and so forth, between a frame to be coded relative to a decoded reference frame, prediction difference (or error) can be reduced, improving the compression efficiency.

As used herein, the term “coder” may refer to an encoder and/or a decoder. Similarly, as used herein, the term “coding” may refer to performing video encoding via an encoder and/or performing video decoding via a decoder. For example, a video encoder and video decoder may both be examples of coders capable of coding video data. In addition, as used herein, the term “codec” may refer to any process, program or set of operations, such as, for example, any combination of software, firmware, and/or hardware that may implement an encoder and/or a decoder. Further, as used herein, the phrase “video data” may refer to any type of data associated with video coding such as, for example, video frames, image data, encoded bit stream data, or the like.

FIG. 1 is an illustrative diagram of an example next generation video encoder 100, arranged in accordance with at least some implementations of the present disclosure. As shown, encoder 100 may receive input video 101. Input video 101 may include any suitable input video for encoding such as, for example, input frames of a video sequence. As shown, input video 101 may be received via a content pre-analyzer module 102. Content pre-analyzer module 102 may be configured to perform analysis of the content of video frames of input video 101 to determine various types of parameters for improving video coding efficiency and speed performance. For example, content pre-analyzer module 102 may determine horizontal and vertical gradient information (for example, Rs, Cs), variance, spatial complexity per picture, temporal complexity per picture (tpcpx), scene change detection, motion range estimation, gain detection, prediction distance estimation (pdist), number of objects estimation, region boundary detection, spatial complexity map computation, focus estimation, film grain estimation, or the like. The parameters generated by content pre-analyzer module 102 may be used by encoder 100 (e.g., via encode controller 103) and/or quantized and communicated to a decoder. As shown, video frames and/or other data may be transmitted from content pre-analyzer module 102 to adaptive picture organizer module 104 (also referred to as the hierarchical picture group structure organizer). The adaptive organizer module 104 determines the picture group structure and the picture types of each picture in the group as well as reorder pictures in encoding order as needed. The adaptive organizer module 104 outputs control signals indicating the picture group structure and picture types (the abbreviations for the output/input controls shown on system 100 are recited below). The NGV coding described herein uses I-pictures (intra-coding), P-pictures (formed from inter-prediction from past/previous reference frames), and F-pictures (functional as described below). In some cases, B-pictures might also be used. In some examples, adaptive picture organizer module 104 may include a frame portion generator configured to generate frame portions. In some examples, content pre-analyzer module 102 and adaptive picture organizer module 104 may together be considered a pre-analyzer subsystem of encoder 100.

As shown, video frames and/or other data may be transmitted from adaptive picture organizer module 104 to prediction partitions generator module 105. In some examples, prediction partitions generator module 105 first may divide a frame or picture into tiles or super-fragments or the like (herein the terms frame, picture, and image may be used interchangeably except as otherwise noted and except that a frame is used to generally refer to a frame that is not necessarily assigned a specific picture type (I, P, F, or B-pictures for example)). In some examples, an additional module (for example, between modules 104 and 105) may be provided for dividing a frame into tiles or super-fragments or the like. By one example for NGV coding, a frame may be divided into tiles of 32×32 or 64×64 pixels where 64×64 is used for all standard definition and higher resolution video for coding of all picture types (I-, P-, or F-). For low resolution sequences, 64×64 is still used for coding of I- and F-pictures, while 32×32 is used for P-pictures.

By one example, prediction partitions generator module (which also may be referred to as Pred KdTree/BiTree Partitions Generator) 105 may then divide each tile or super-fragment into potential prediction partitionings or partitions. In some examples, the potential prediction partitionings may be determined using a partitioning technique such as, for example, a k-d tree partitioning technique, a bi-tree partitioning technique, or the like, which may be determined based on the picture type (for example, I-, P-, or F-picture) of individual video frames, a characteristic of the frame portion being partitioned, or the like. By one example, if an I-picture is being coded, every tile, or almost all tiles, are further divided into KdTree based partitions that can divide a space until a set minimum size is reached, and in one dimension at a time. The options for dividing the space may include no further division, division into two equal halves, division into two parts that are ¼ and ¾ of the space, or division into two parts that are ¾ and ¼ of the space. So, with I-pictures using 64×64 as the largest size (and allowing a minimum size of 4×4), a very large number of partitions of a tile can be generated if no other constraints are imposed. For example, one constraint is to set that the first pair of cuts are pre-decided for a 64×64 tile to halve the space in both the horizontal and vertical dimension so that four 32×32 sub-tiles are formed, and then sub-partitioning each 32×32 sub-tile by KdTree partitioning. Other restrictions are also possible to reduce the number of possible partition combinations.

These partitions of an I-picture tile are referred to as prediction partitions, as each tile partition may be used for spatial prediction (directional angular prediction or other types of prediction) and coding of prediction differences. Likewise, P-picture tiles can also be partitioned in this manner for prediction except that for lower resolutions, P-picture partitions start with a 32×32 tile, and KdTree based partitions are not used, but rather a simpler Bi-Tree partitioning is used. Bi-Tree partitioning divides a space into two equal parts, one dimension at a time, alternating between the two dimensions. Further P-picture partitions are mainly predicted using motion (with one or more references) rather than spatial prediction, although some subpartitions can use intra spatial prediction to deal with, for instance, uncovered background. For standard definition to higher resolution picture sizes, P-pictures start with 64×64 tiles before being divided. Finally, F-pictures also use Bi-Tree partitioning and start with 64×64 tiles for generating prediction partitions that mainly use motion (with one or more partitions), although some subpartitions can also use spatial prediction (for intra coding).

In NGV coding, there is much more to generation of inter prediction data than simply using motion vectors to generate prediction, and is discussed elsewhere. In P- and F-picture coding, each sub-partition's prediction is identified by including a prediction mode. The prediction modes include skip, auto, intra, inter, multi, and split. Skip mode is used to skip prediction coding when, for example, there is no, or relatively little change, from a reference frame to a current frame being reconstructed so that the pixel data need not be encoded and merely copied from one frame to the other when decoded. Auto mode is used when only partial data is needed so that for example, motion vectors may not be needed but transform coefficients are still used to code the data. Intra mode means that the frame or partition is spatially coded. Split means a frame or partition needs to be split into smaller parts or partitions before being coded. Inter mode means that multiple reference frames are determined for a current frame, and motion estimations are obtained by using each reference separately, and then the best result is used for the motion prediction data. Multi mode also uses multiple reference frames, but in this case, the motion estimation data from the multiple reference frames is combined, such as averaged, or weighted averaged, to obtain a single result to be used for the prediction.

One of the outputs of prediction partitions generator module 105 may be hundreds of potential partitionings (and more or less depending on the limits placed on the partitioning) of a tile. These partitionings are indexed as 1 . . . m and are provided to the encode controller 103 to select the best possible prediction partitioning for use. As mentioned, the determined potential prediction partitionings may be partitions for prediction (for example, inter- or intra-prediction) and may be described as prediction partitions or prediction blocks or the like.

In some examples, a selected prediction partitioning (for example, prediction partitions) may be determined from the potential prediction partitionings. For example, the selected prediction partitioning may be based on determining, for each potential prediction partitioning, predictions using characteristics and motion based multi-reference predictions or intra-predictions, and determining prediction parameters. For each potential prediction partitioning, a potential prediction error may be determined by differencing original pixels with prediction pixels, and the selected prediction partitioning may be the potential prediction partitioning with the minimum prediction error. In other examples, the selected prediction partitioning may be determined based on a rate distortion optimization including a weighted scoring based on number of bits for coding the partitioning and a prediction error associated with the prediction partitioning.

As shown, the original pixels of the selected prediction partitioning (for example, prediction partitions of a current frame) may be differenced with predicted partitions (for example, a prediction of the prediction partition of the current frame based on a reference frame or frames and other predictive data such as inter- or intra-prediction data) at differencer 106. The determination of the predicted partitions will be described further below and may include a decode loop 135 as shown in FIG. 1. As to the differences, the original partitioned blocks also are differenced with the prediction blocks to determine whether or not any residual signal exists that warrants encoding. Thus, not all subpartitions of a tile actually need to be coded (using transform coding for example) as prediction may have been sufficient for certain subpartitions.

Otherwise, any residuals or residual data (for example, partition prediction error data) from the differencing that indicate that the partition cannot be compensated by prediction alone (such as motion compensation alone) may be transmitted to coding partitions generator module (or by one example, coding bitree partitions generator) 107 to be further subpartitioned into smaller partitions for transform coding (coding partitions), and particularly for P-pictures and F-pictures by one example. In P- or F-pictures or frames, in some cases where very simple content and/or large quantizer step sizes exist, the coding partitions may equal the size of the entire tile, or the coding partitions and prediction partitions may have the same size in these cases. Thus, some P- and F-picture tiles may contain no coding partitioning, one coding partitioning, or multiple coding partitionings. These coding partitions are indexed as 1 . . . n, and are provided to encode controller 103 to select the best possible combination of prediction and coding partitioning from the given choices.

Also, in some of these examples, such as for intra-prediction of prediction partitions in any picture type (I-, F- or P-pictures), or otherwise where prediction partitions are not further divided into coding partitions (where coding partitions are skipped), coding partitions generator module 107 may be bypassed via switches 107 a and 107 b. In such examples, only a single level of partitioning may be performed. Such partitioning, where only a single level of partitioning exists, it may be described as prediction partitioning (as discussed) or coding partitioning or both. In various examples, such partitioning may be performed via prediction partitions generator module 105 (as discussed) or, as is discussed further herein, such partitioning may be performed via a k-d tree intra-prediction/coding partitioner module or a bi-tree intra-prediction/coding partitioner module implemented via coding partitions generator module 107.

In some examples, the partition prediction error data, if any, may not be significant enough to warrant encoding. In other examples, where it may be desirable to encode the partition prediction error data and the partition prediction error data is associated with inter-prediction or the like, coding partitions generator module 107 may determine coding partitions of the prediction partitions. In some examples, coding partitions generator module 107 may not be needed as the partition may be encoded without coding partitioning (e.g., as shown via the bypass path available via switches 107 a and 107 b). With or without coding partitioning, the partition prediction error data (which may subsequently be described as coding partitions in either event) may be transmitted to adaptive transform module 108 in the event the residuals or residual data require encoding. In some examples, prediction partitions generator module 105 and coding partitions generator module 107 may together be considered a partitioner subsystem of encoder 100. In various examples, coding partitions generator module 107 may operate on partition prediction error data, original pixel data, residual data, or wavelet data. Coding partitions generator module 107 may generate potential coding partitionings (for example, coding partitions) of, for example, partition prediction error data using bi-tree and/or k-d tree partitioning techniques or the like.

After the partitioning (after prediction partitions are formed for I-pictures, and coding partitions are formed for P- and F-pictures, and in some examples, the potential coding partitions), the partitions may be transformed using adaptive or fixed transforms with various block sizes via adaptive transform module 108 (also, in one form, referred to as the Adaptive Multi-size Rect Hybrid Parametric Haar Transform (HPHT)/Discrete Cosine Transform (DCT) unit). By one approach, the adaptive transform module 108 may perform forward HPHT or forward DCT on rectangular blocks. By one example, partition/block size as well as selected transforms (for example, adaptive or fixed, and HPHT or DCT) may be determined based on a rate distortion optimization (RDO) or other basis. In some examples, both the selected coding partitioning and/or the selected transform(s) may be determined based on a predetermined selection method based on coding partitions size or the like. For example, adaptive transform module 108 may include a first portion or component for performing a parametric transform to allow locally optimal transform coding of small to medium size blocks, and a second portion or component for performing globally stable, low overhead transform coding using a fixed transform, such as DCT or a picture based transform from a variety of transforms, including parametric transforms, or any other configuration. In some examples, for locally optimal transform coding, HPHT may be performed. In some examples, transforms may be performed on 2D blocks of rectangular sizes between about 4×4 pixels and 64×64 pixels, with actual sizes depending on a number of factors such as whether the transformed data is luma or chroma, or inter or intra, or if the determined transform used is PHT or DCT or the like.

For HPHT transform, small to medium block sizes are supported while for DCT transform a large number of block sizes are supported. For HPHT transform, some overhead is needed to identify the direction, either horizontal or vertical in which DCT is applied while the PHT is applied in the orthogonal direction, as well as the mode (at least for intra-coding where a mode can be based on decoded pixels or prediction difference pixels). The actual PHT transform basis used for transforming a particular block may be content adaptive as it depends on decoded neighboring pixels. Since both encoder and decoder require calculation of the same basis matrix, the complexity of the calculation is kept low by allowing a limited number of good transforms known (to both encoder and decoder) that one can select from.

As shown, the resultant transform coefficients may be transmitted to adaptive quantize module 109, while a quantizer adapter control 133 at the encode controller 103 performs analysis of content to come up with locally adaptive quantization parameters that are then represented by a multi-level map that can be efficiently coded and included in the bitstream. The computed quantizer set (qs, and a matrix applied to a coefficient block) may be used by the adaptive quantizer module 109 to perform scaling of the resultant transform coefficients. Further, any data associated with a parametric transform, as needed, may be transmitted to either adaptive quantize module 109 (if quantization is desired) or adaptive entropy encoder module 110. Also as shown in FIG. 1, the quantized coefficients may be scanned and transmitted to adaptive entropy encoder module 110. Adaptive entropy encoder module 110 may entropy encode the quantized coefficients and include them in output bitstream 111. In some examples, adaptive transform module 108 and adaptive quantize module 109 may together be considered a transform encoder subsystem of encoder 100.

As also shown in FIG. 1, encoder 100 includes the local decode loop 135 to form predicted partitions (or frames) for comparison to the prediction partitions as mentioned above. Preliminarily, depending on the RDO operation, not all of the hundreds or more tile partitions described above need to be fully coded such as when lookup of bitcounts are sufficient. Once the best partitioning of a tile is determined, however, in that case full coding may be provided.

The local decode loop 135 may begin at adaptive inverse quantize module 112.

Adaptive inverse quantize module 112 may be configured to perform the opposite operation(s) of adaptive quantize module 109 such that an inverse scan may be performed and quantized coefficients may be de-scaled to determine transform coefficients. Such an adaptive quantize operation may be lossy, for example. As shown, the transform coefficients may be transmitted to an adaptive inverse transform module 113. Adaptive inverse transform module 113 may perform the inverse transform as that performed by adaptive transform module 108, for example, to generate residuals or residual values or partition prediction error data (or original data or wavelet data, as discussed) associated with coding partitions. In some examples, adaptive inverse quantize module 112 and adaptive inverse transform module 113 may together be considered a transform decoder subsystem of encoder 100.

As shown, the partition prediction error data (or the like) for P and F-pictures may be transmitted to optional coding partitions assembler 114. Coding partitions assembler 114 may assemble coding partitions into decoded prediction partitions as needed (as shown, in some examples, coding partitions assembler 114 may be skipped such as for I-picture tile partitioning, and via switches 114 a and 114 b such that decoded prediction partitions may have been generated at adaptive inverse transform module 113) to generate prediction partitions of prediction error data or decoded residual prediction partitions or the like. As shown, the decoded residual prediction partitions (inter or intra) may be added to predicted partitions (for example, prediction pixel data) at adder 115 to generate reconstructed prediction partitions. The reconstructed prediction partitions may be transmitted to prediction partitions assembler 116. Prediction partitions assembler 116 may assemble the reconstructed prediction partitions to generate reconstructed tiles or super-fragments. In some examples, coding partitions assembler module 114 and prediction partitions assembler module 116 may together be considered an un-partitioner subsystem of encoder 100.

The next set of steps involve filtering, and intermingling of filtering and prediction generation. Overall four types of filtering are shown. Specifically, in FIG. 1, the reconstructed partitions are deblocked and dithered by a blockiness analyzer & deblock filtering module (also Recon Blockiness Analyzer & DD Filt Gen) 117. The resulting parameters for analysis ddi are used for filtering operation and are also coded and sent to the decoder via the bitstream 111. The deblocked reconstructed output is then handed over to the quality analyzer & quality restoration filtering module (or quality improvement filter also referred to as Recon Quality Analyzer & QR Filt Gen) 118, which computes QR filtering parameters and uses them for filtering. These parameters are also coded and sent via the bitstream 111 to the decoder. The QR filtered output is the final reconstructed or decoded frame that is also used as a prediction for coding future frames.

More specifically, when the reconstructed tiles or super-fragments may be transmitted to blockiness analyzer and deblock filtering module 117, the blockiness analyzer and deblock filtering module 117 may deblock and dither the reconstructed tiles or super-fragments (or prediction partitions of tiles or super-fragments). The generated deblock and dither filter parameters may be used for the current filter operation and/or coded in bitstream 111 for use by a decoder, for example. The output of blockiness analyzer and deblock filtering module 117 may be transmitted to the quality analyzer and quality restoration filtering module 118. Quality analyzer and quality restoration filtering module 118 may determine QR filtering parameters (for example, for a QR decomposition) and use the determined parameters for filtering. The QR filtering parameters may also be coded in bitstream 111 for use by a decoder. In some examples, blockiness analyzer and deblock filtering module 117 and quality analyzer and quality restoration filtering module 118 may together be considered a filtering subsystem of encoder 100. In some examples, the output of quality analyzer and quality restoration filtering module 118 may be a final reconstructed frame that may be used for prediction for coding other frames (for example, the final reconstructed frame may be a reference frame or the like). Thus, as shown, the output of quality analyzer and quality restoration filtering module 118 may be transmitted to a multi-reference frame storage and frame selector (or multi reference control) 119 which also may be referred to as, or may include, the decoded picture storage or buffer. A dependency logic module 128 (also referred to, in one example, as dependency logic for mod multi ref pred in hierarchical picture group struct) may provide indices for listing the reference frames and the relationship among the frames such as frame dependencies, or more specifically partition dependencies, for proper ordering and use for the frames by the multi reference control 119 and when certain frames are to be selected for prediction of another frame. This may include providing the dependency logic for picture group structures such as multi-reference prediction, chain prediction, hierarchal structures, and/or other prediction techniques as described below.

Next, encoder 100 may perform inter- and/or intra-prediction operations. As shown in FIG. 1, inter-prediction may be performed by one or more modules including morphing generation and local buffer module 120 (and in one example is referred to as Morph Gen & Loc Buf, or referred to herein as the in-loop morphing generation module), synthesizing generation and local buffer module 121 (and in one example is referred to as Synth Gen & Pic Buffer or referred to herein as in-loop synthesizing generation module), motion estimator 122, characteristics and motion filtering and predictor module 123 (also in some examples may be referred to as Char and Motion AP Filter Analyzer & ¼ & ⅛ Pel Compensated Predictor), morphing analyzer and generation module (or out-of-loop morphing analyzer module) 130, and synthesizing analyzer and generation module (or out-of-loop synthesizing analyzer module) 132, where the morphing and synthesis generators 120 and 121 are considered in-loop (in the decoder loop of the encoder), and where the morphing and synthesis analyzers 130 and 132 are considered out-of-loop (out of the decoder loop at the encoder). Note that while one is called an analyzer and the other a generator, both in-loop and out-of-loop modules may perform the same or similar tasks (forming modified frames and modification parameters for morphing and/or synthesis). Using these components, morphing generation module 120, or morphing analyzer 130, may permit various forms of morphing of a decoded frame to then be used as a reference frame for motion prediction on other frames. The module 120 may analyze a current picture to determine morphing parameters for (1) changes in gain, and specifically to perform gain compensation for changes in brightness from one frame to another frame and as discussed in detail below, (2) changes in dominant (or global) motion, (3) changes in registration, and/or (4) changes in blur with respect to a reference frame or frames with which it is to be coded, and prior to motion compensated prediction.

The out-of-loop morphing analyzer 130 and the synthesizing analyzer 132 receive picture group structure data from the adaptive picture organizer 104 and communicate with the encoder controller 103 to form the morphing and synthesis parameters (mop, syp) and modified reference frames based on the non-quantized, non-decoded, original frame data. The formation of the modified reference frames and modification parameters from the out-of-loop morphing and synthesis analyzers 130 and 132 may be much faster than that provided through the decoder loop 135, and this is especially advantageous for real time encoding. However, the use of the modified frames and parameters to perform compensation at another location, such as by a decoder, should be performed by the in-loop morphing and synthesis generators 120 and 121 on the decoding loop side of the encoder so that the correct compensation can be repeated when reconstructing frames at the decoder. Thus, the resulting modification parameters from the out-of-loop analyzers 130 and 132 are used by the in-loop morphing and synthesizing generator 120 and 121 to form the modified reference frames and for motion estimation by the motion estimator 122 to compute motion vectors. Thus, the computed morphing and synthesis parameters (mop and syp) may be quantized/de-quantized and used (for example, by morphing generation module 120) to generate morphed reference frames that may be used by motion estimator module 122 for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame. The synthesizing generation module 121 uses several types of synthesized frames including super resolution (SR) pictures, projected interpolation (PI) pictures, among others in which motion compensated prediction can result in even higher gains by determining motion vectors for efficient motion compensated prediction in these frames. The details for some examples to perform morphing or synthesis are provided below

Motion estimator module 122 may generate motion vector data based at least in part on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame. In some examples, motion estimator module 122 may be considered an inter-prediction module. For example, the motion vector data may be used for inter-prediction. If inter-prediction is applied, characteristics and motion filtering predictor module 123 may apply motion compensation as part of the local decode loop as discussed. Also, characteristics and motion filtering predictor module 123 may include adaptive precision (AP) filtering where filtering and prediction are intertwined. The filtering parameters (api) are coded and may be sent to the decoder via the bitstream 111.

Intra-prediction may be performed by intra-directional prediction analyzer and prediction generation module 124. Intra-directional prediction analyzer and prediction generation module 124 may be configured to perform spatial directional prediction and may use decoded neighboring partitions. In some examples, both the determination of direction and generation of prediction may be performed by intra-directional prediction analyzer and prediction generation module 124. In some examples, intra-directional prediction analyzer and prediction generation module 124 may be considered an intra-prediction module.

As shown in FIG. 1, prediction modes and reference types analyzer module 125 may allow for selection of prediction modes as introduced above and from among, “skip”, “auto”, “inter”, “split”, “multi”, and “intra”, for each prediction partition of a tile (or super-fragment), all of which may apply to P- and F-pictures (as well as B-pictures when they are present). It should be noted that while the system considers a configuration where I, P, and F picture are available, it is possible to still provide B-pictures where no morphing or synthesis is available for the B-pictures. In addition to prediction modes, it also allows for selection of reference types that can be different depending on “inter” or “multi” mode, as well as for P- and F-pictures. The prediction signal at the output of prediction modes and reference types analyzer module 125 may be filtered by prediction analyzer and prediction fusion filtering module 126. Prediction analyzer and prediction fusion filtering module 126 may determine parameters (for example, filtering coefficients, frequency, overhead) to use for filtering and may perform the filtering. In some examples, filtering the prediction signal may fuse different types of signals representing different modes (e.g., intra, inter, multi, split, skip, and auto). In some examples, intra-prediction signals may be different than all other types of inter-prediction signal(s) such that proper filtering may greatly enhance coding efficiency. In some examples, the filtering parameters may be encoded in bitstream 111 for use by a decoder. The filtered prediction signal may provide the second input (e.g., prediction partition(s)) to differencer 106, as discussed above, that may determine the prediction difference signal (e.g., partition prediction error) for coding discussed earlier. Further, the same filtered prediction signal may provide the second input to adder 115, also as discussed above. As discussed, output bitstream 111 may provide an efficiently encoded bitstream for use by a decoder for the presentment of video.

In operation, some components of encoder 100 may operate as an encoder prediction subsystem. For example, such an encoder prediction subsystem of encoder 100 may include multi-reference frame storage and frame selector 119, in-loop morphing analyzer and generation module 120, in-loop synthesizing analyzer and generation module 121, motion estimator module 122, and/or characteristics and motion compensated precision adaptive filtering predictor module 123 as well as out-of-loop morphing analyzer 130 and synthesizing analyzer 132.

As will be discussed in greater detail below, in some implementations, such an encoder prediction subsystem of encoder 100 may incorporate a number of components and the combined predictions generated by these components in an efficient video coding algorithm. For example, proposed implementation of the NGV coder may include one or more of the following features: 1. Gain Compensation (e.g., explicit compensation for changes in gain/brightness in a scene); 2. Blur Compensation: e.g., explicit compensation for changes in blur/sharpness in a scene; 3. Dominant/Global Motion Compensation (e.g., explicit compensation for dominant motion in a scene); 4. Registration Compensation (e.g., explicit compensation for registration mismatches in a scene); 5. Super Resolution (e.g., explicit model for changes in resolution precision in a scene); 6. Projection (e.g., explicit model for changes in motion trajectory in a scene); the like, and/or combinations thereof.

For example, in such an encoder prediction subsystem of encoder 100, the output of quality analyzer and quality restoration filtering may be transmitted to multi-reference frame storage and frame selector 119. In some examples, the output of quality analyzer and quality restoration filtering may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). In encoder 100, prediction operations may include inter- and/or intra-prediction. As shown, inter-prediction may be performed by one or more modules including morphing generation module 120, synthesizing generation module 121, and/or characteristics and motion compensated precision adaptive filtering predictor module 123.

As will be described in greater detail below, morphing generation module 120 may analyze a current picture to determine parameters for changes in gain, changes in dominant motion, changes in registration, and changes in blur with respect to a reference frame or frames with which it is to be coded. The determined morphing parameters may be quantized/de-quantized and used (e.g., by morphing generation module 120) to generate morphed reference frames. Such generated morphed reference frames may be stored in a buffer and may be used by motion estimator module 122 for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

Similarly, synthesizing analyzer and generation module 121 may generate super resolution (SR) pictures and projected interpolation (PI) pictures or the like for determining motion vectors for efficient motion compensated prediction in these frames. Such generated synthesized reference frames may be stored in a buffer and may be used by motion estimator module 122 for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

Accordingly, in such an encoder prediction subsystem of encoder 100, motion estimator module 122 may generate motion vector data based on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame. In some examples, motion estimator module 122 may be considered an inter-prediction module. For example, the motion vector data may be used for inter-prediction. If inter-prediction is applied, characteristics and motion filtering predictor module 123 may apply motion compensation as part of the local decode loop as discussed.

In operation, the proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may use one or more of the above components besides the usual local motion compensation with respect to decoded past and/or future, picture/slices. As such the implementation does not mandate a specific solution for instance for gain compensation, or for any other characteristics compensated reference frame generation.

FIG. 1 illustrates example control signals associated with operation of video encoder 100, where the following abbreviations may represent the associated information:

-   -   scnchg Scene change information     -   spcpx Spatial complexity information     -   tpcpx Temporal complexity information     -   pdist Temporal prediction distance information     -   pap Pre Analysis parameters (placeholder for all other pre         analysis parameters except scnchg, spcpx, tpcpx, pdist)     -   ptyp Picture types information     -   pgst Picture group structure information     -   pptn cand. Prediction partitioning candidates     -   cptn cand. Coding Partitioning Candidates     -   prp Preprocessing     -   xmtyp Transform type information     -   xmdir Transform direction information     -   xmmod Transform mode     -   ethp One eighth (⅛th) pel motion prediction     -   pptn Prediction Partitioning     -   cptn Coding Partitioning     -   mot&cod cost Motion and Coding Cost     -   qs quantizer information set (includes Quantizer parameter (Qp),         Quantizer matrix (QM) choice)     -   mv Motion vectors     -   mop Morphing Parameters     -   syp Synthesizing Parameters     -   ddi Deblock and dither information     -   qri Quality Restoration filtering index/information     -   api Adaptive Precision filtering index/information     -   fii Fusion Filtering index/information     -   mod Mode information     -   reftyp Reference type information     -   idir Intra Prediction Direction

The various signals and data items that may need to be sent to the decoder, i.e., pgst, ptyp, prp, pptn, cptn, modes, reftype, ethp, xmtyp, xmdir, xmmod, idir, mv, qs, mop, syp, ddi, qri, api, fii, quant coefficients and others may then be entropy encoded by adaptive entropy encoder 110 that may include different entropy coders collectively referred to as an entropy encoder subsystem. The adaptive entropy encoder 110 may be used to encode various types of control data/signals, parameters, modes and ref types, motion vectors, and transform coefficients. It is based on a generic class of low complexity entropy coders called adaptive variable length coders (vlc). The data to be entropy coded may be divided into several categories when convenient (seven in our case), and starting from generic vlc coders, specialized coders are developed for each category. While these control signals are illustrated as being associated with specific example functional modules of encoder 100 in FIG. 1, other implementations may include a different distribution of control signals among the functional modules of encoder 300. The present disclosure is not limited in this regard and, in various examples, implementation of the control signals herein may include the undertaking of only a subset of the specific example control signals shown, additional control signals, and/or in a different arrangement than illustrated.

FIG. 2 is an illustrative diagram of an example next generation video decoder 200, arranged in accordance with at least some implementations of the present disclosure and that utilizes the content adaptive P- and F-pictures and resulting picture groups herein. The general operation of this NGV decoder 200 may be similar to the local decoding loop in the NGV Encoder 100 discussed earlier with the caveat that the motion compensation decoding loop in a decoder does not require any components that require analysis to determine parameters as the parameters are actually sent via the bitstream 111 or 201 to decoder 200. The bitstream 201 to be decoded is input to adaptive entropy encoder (Content and Context Adaptive Entropy Decoder) 202 which decodes headers, control signals and encoded data. For instance, it decodes ptyp, pgst, prp, pptn, cptn, ethp, mop, syp, mod, reftyp, idir, qs, xmtyp, xmdir, xmmod, ddi, qri, api, fii, mv, listed above, and quantized transform coefficients that constitute the overhead, control signals and data that is distributed for use throughout the decoder. The quantized transform coefficients are then inverse quantized and inverse transformed by adaptive inverse quantize module 203 and adaptive inverse transform (also Adaptive Multi-size Rect HPHT/DCT) 204 to produce rectangular partitions of decoded pixel differences that are assembled as per coding partitioning used. Predictions are added to the differences resulting in generation of recon (reconstructed) coded partitions that undergo further reassembly as per motion partitioning to generate reconstructed tiles and frames that undergo deblocking and dithering in deblocking filter (Recon DD Filt Gen) 208 using decoded ddi parameters, followed by quality restoration filtering (or Recon QR Filt Gen) 209 using decoded qri parameters, a process that creates the final recon frames.

The final recon frames are saved in multi-reference frame storage and frame selector (also may be called decoded picture buffer) 210, and are used (or morphed) to create morphed pictures/local buffers (at morphed picture generator and buffer 211) depending on the applied, decoded mop parameters. Likewise synthesized picture and local buffers (at synthesized picture generation and buffer 212) are created by applying decoded syp parameters to multi-reference frame storage and frame selector 210 (or in other words, the reconstructed frames in the storage or buffer 210). A dependency logic 220 may hold the index for, and perform the indexing for, the stored frames in the multi-reference frame storage 210. The indexing may be used for prediction techniques such as multi-reference frames, chain prediction and/or hierarchal (or pyramid) frame structures, and/or others as described below. The morphed local buffers, and synthesized frames are used for motion compensated prediction that uses adaptive precision (AP) filtering based on api parameters, and keeps either ¼ or ⅛ pel prediction depending on a decoded the ethp signal. In fact, a characteristics and motion compensated filtering predictor 213, depending on the mod, generates “inter” multi” “skip” or “auto” partitions while an intra-directional prediction generation module 214 generates “intra” partitions, and prediction modes selector 215, based on an encoder selected option, allows partition of the correct mode to pass through. Next, selective use of prediction fusion filter generation module (or Pred FI Filter Gen) 216 to filter and output the prediction is performed as needed as the second input to the adder.

The recon frames at the output of the quality filter generation module 209 (or Recon QR Filt Gen) are reordered (as F-pictures are out of order) by adaptive picture reorganizer (or Hierarchical Picture Group Structure Reorganizer) 217 in response to control parameters of ptyp and pgst, and further the output of this reorganizer undergoes optional processing in content post restorer 218 that is controlled by prp parameters sent by the encoder. This processing among other things may include deblocking and film grain addition.

More specifically, and as shown, decoder 200 may receive an input bitstream 201. In some examples, input bitstream 201 may be encoded via encoder 100 and/or via the encoding techniques discussed herein. As shown, input bitstream 201 may be received by an adaptive entropy decoder module 202. Adaptive entropy decoder module 202 may decode the various types of encoded data (e.g., overhead, motion vectors, transform coefficients, etc.). In some examples, adaptive entropy decoder 202 may use a variable length decoding technique. In some examples, adaptive entropy decoder 202 may perform the inverse operation(s) of adaptive entropy encoder module 110 discussed above.

The decoded data may be transmitted to adaptive inverse quantize module 203. Adaptive inverse quantize module 203 may be configured to inverse scan and de-scale quantized coefficients to determine transform coefficients. Such an adaptive quantize operation may be lossy, for example. In some examples, adaptive inverse quantize module 203 may be configured to perform the opposite operation of adaptive quantize module 109 (e.g., substantially the same operations as adaptive inverse quantize module 112). As shown, the transform coefficients (and, in some examples, transform data for use in a parametric transform) may be transmitted to an adaptive inverse transform module 204. Adaptive inverse transform module 204 may perform an inverse transform on the transform coefficients to generate residuals or residual values or partition prediction error data (or original data or wavelet data) associated with coding partitions. In some examples, adaptive inverse transform module 204 may be configured to perform the opposite operation of adaptive transform module 108 (e.g., substantially the same operations as adaptive inverse transform module 113). In some examples, adaptive inverse transform module 204 may perform an inverse transform based on other previously decoded data, such as, for example, decoded neighboring partitions. In some examples, adaptive inverse quantize module 203 and adaptive inverse transform module 204 may together be considered a transform decoder subsystem of decoder 200.

As shown, the residuals or residual values or partition prediction error data may be transmitted to coding partitions assembler 205. Coding partitions assembler 205 may assemble coding partitions into decoded prediction partitions as needed (as shown, in some examples, coding partitions assembler 205 may be skipped via switches 205 a and 205 b such that decoded prediction partitions may have been generated at adaptive inverse transform module 204). The decoded prediction partitions of prediction error data (e.g., prediction partition residuals) may be added to predicted partitions (e.g., prediction pixel data) at adder 206 to generate reconstructed prediction partitions. The reconstructed prediction partitions may be transmitted to prediction partitions assembler 207. Prediction partitions assembler 207 may assemble the reconstructed prediction partitions to generate reconstructed tiles or super-fragments. In some examples, coding partitions assembler module 205 and prediction partitions assembler module 207 may together be considered an un-partitioner subsystem of decoder 200.

The reconstructed tiles or super-fragments may be transmitted to deblock filtering module 208. Deblock filtering module 208 may deblock and dither the reconstructed tiles or super-fragments (or prediction partitions of tiles or super-fragments). The generated deblock and dither filter parameters may be determined from input bitstream 201, for example. The output of deblock filtering module 208 may be transmitted to a quality restoration filtering module 209. Quality restoration filtering module 209 may apply quality filtering based on QR parameters, which may be determined from input bitstream 201, for example. As shown in FIG. 2, the output of quality restoration filtering module 209 may be transmitted to multi-reference frame storage and frame selector (which may be referred to as a multi-reference control, and may be, or may include, a decoded picture buffer) 210. In some examples, the output of quality restoration filtering module 209 may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). In some examples, deblock filtering module 208 and quality restoration filtering module 209 may together be considered a filtering subsystem of decoder 200.

As discussed, compensation due to prediction operations may include inter- and/or intra-prediction compensation. As shown, inter-prediction compensation may be performed by one or more modules including morphing generation module 211, synthesizing generation module 212, and characteristics and motion compensated filtering predictor module 213. Morphing generation module 211 may use de-quantized morphing parameters (e.g., determined from input bitstream 201) to generate morphed reference frames. Synthesizing generation module 212 may generate super resolution (SR) pictures and projected interpolation (PI) pictures or the like based on parameters determined from input bitstream 201. If inter-prediction is applied, characteristics and motion compensated filtering predictor module 213 may apply motion compensation based on the received frames and motion vector data or the like in input bitstream 201.

Intra-prediction compensation may be performed by intra-directional prediction generation module 214. Intra-directional prediction generation module 214 may be configured to perform spatial directional prediction and may use decoded neighboring partitions according to intra-prediction data in input bitstream 201.

As shown in FIG. 2, prediction modes selector module 215 may determine a prediction mode selection from among, “skip”, “auto”, “inter”, “multi”, and “intra”, for each prediction partition of a tile, all of which may apply to P- and F-pictures, based on mode selection data in input bitstream 201. In addition to prediction modes, it also allows for selection of reference types that can be different depending on “inter” or “multi” mode, as well as for P- and F-pictures. The prediction signal at the output of prediction modes selector module 215 may be filtered by prediction fusion filtering module 216. Prediction fusion filtering module 216 may perform filtering based on parameters (e.g., filtering coefficients, frequency, overhead) determined via input bitstream 201. In some examples, filtering the prediction signal may fuse different types of signals representing different modes (e.g., intra, inter, multi, skip, and auto). In some examples, intra-prediction signals may be different than all other types of inter-prediction signal(s) such that proper filtering may greatly enhance coding efficiency. The filtered prediction signal may provide the second input (e.g., prediction partition(s)) to differencer 206, as discussed above.

As discussed, the output of quality restoration filtering module 209 may be a final reconstructed frame. Final reconstructed frames may be transmitted to an adaptive picture re-organizer 217, which may re-order or re-organize frames as needed based on ordering parameters in input bitstream 201. Re-ordered frames may be transmitted to content post-restorer module 218. Content post-restorer module 218 may be an optional module configured to perform further improvement of perceptual quality of the decoded video. The improvement processing may be performed in response to quality improvement parameters in input bitstream 201 or it may be performed as standalone operation. In some examples, content post-restorer module 218 may apply parameters to improve quality such as, for example, an estimation of film grain noise or residual blockiness reduction (e.g., even after the deblocking operations discussed with respect to deblock filtering module 208). As shown, decoder 200 may provide display video 219, which may be configured for display via a display device (not shown).

In operation, some components of decoder 200 may operate as a decoder prediction subsystem. For example, such a decoder prediction subsystem of decoder 200 may include multi-reference frame storage and frame selector 210, dependency logic 220 to index the frames at the multi-reference frame storage and frame selector 210, morphing analyzer and generation module 211, synthesizing analyzer and generation module 212, and/or characteristics and motion compensated precision adaptive filtering predictor module 213.

As will be discussed in greater detail below, in some implementations, such a decoder prediction subsystem of decoder 200 may incorporate a number of components and the combined predictions generated by these components in an efficient video coding algorithm. For example, proposed implementation of the NGV coder may include one or more of the following features: 1. Gain Compensation (e.g., explicit compensation for changes in gain/brightness in a scene); 2. Blur Compensation: e.g., explicit compensation for changes in blur/sharpness in a scene; 3. Dominant/Global Motion Compensation (e.g., explicit compensation for dominant motion in a scene); 4. Registration Compensation (e.g., explicit compensation for registration mismatches in a scene); 5. Super Resolution (e.g., explicit model for changes in resolution precision in a scene); 6. Projection (e.g., explicit model for changes in motion trajectory in a scene); the like, and/or combinations thereof.

For example, in such a decoder prediction subsystem of decoder 200, the output of quality restoration filtering module may be transmitted to multi-reference frame storage and frame selector 210. In some examples, the output of quality restoration filtering module may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). As discussed, compensation due to prediction operations may include inter- and/or intra-prediction compensation. As shown, inter-prediction compensation may be performed by one or more modules including morphing analyzer and generation module 211, synthesizing analyzer and generation module 212, and/or characteristics and motion compensated precision adaptive filtering predictor module 213.

As will be described in greater detail below, morphing analyzer and generation module 211 may use de-quantized morphing parameters (e.g., determined from input bitstream) to generate morphed reference frames. Such generated morphed reference frames may be stored in a buffer and may be used by characteristics and motion compensated precision adaptive filtering predictor module 213.

Similarly, synthesizing analyzer and generation module 212 may be configured to generate one or more types of synthesized prediction reference pictures such as super resolution (SR) pictures and projected interpolation (PI) pictures or the like based on parameters determined from input bitstream 201. Such generated synthesized reference frames may be stored in a buffer and may be used by motion compensated filtering predictor module 213.

Accordingly, in such a decoder prediction subsystem of decoder 200, in cases where inter-prediction is applied, characteristics and motion compensated filtering predictor module 213 may apply motion compensation based on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame.

In operation, the proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may use one or more of the above components besides the usual local motion compensation with respect to decoded past and/or future, picture/slices. As such the implementation does not mandate a specific solution for instance for Gain compensation, or for any other characteristics compensated reference frame generation.

FIG. 2 illustrates example control signals associated with operation of video decoder 200, where the indicated abbreviations may represent similar information as discussed with respect to FIG. 1 above. While these control signals are illustrated as being associated with specific example functional modules of decoder 200, other implementations may include a different distribution of control signals among the functional modules of encoder 100. The present disclosure is not limited in this regard and, in various examples, implementation of the control signals herein may include the undertaking of only a subset of the specific example control signals shown, additional control signals, and/or in a different arrangement than illustrated.

While FIGS. 1 and 2 illustrate particular encoding and decoding modules, various other coding modules or components not depicted may also be utilized in accordance with the present disclosure. Further, the present disclosure is not limited to the particular components illustrated in FIGS. 1 and 2 and/or to the manner in which the various components are arranged. Various components of the systems described herein may be implemented in software, firmware, and/or hardware and/or any combination thereof. For example, various components of encoder 100 and/or decoder 200 may be provided, at least in part, by hardware of a computing System-on-a-Chip (SoC) such as may be found in a computing system such as, for example, a mobile phone.

Further, it may be recognized that encoder 100 may be associated with and/or provided by a content provider system including, for example, a video content server system, and that output bitstream 111 may be transmitted or conveyed to decoders such as, for example, decoder 200 by various communications components and/or systems such as transceivers, antennae, network systems, and the like not depicted in FIGS. 1 and 2. It may also be recognized that decoder 200 may be associated with a client system such as a computing device (e.g., a desktop computer, laptop computer, tablet computer, convertible laptop, mobile phone, or the like) that is remote to encoder 100 and that receives input bitstream 201 via various communications components and/or systems such as transceivers, antennae, network systems, and the like not depicted in FIGS. 1 and 2. Therefore, in various implementations, encoder 100 and decoder subsystem 200 may be implemented either together or independent of one another.

FIG. 3 is an illustrative diagram of example subsystems associated with next generation video encoder 100, arranged in accordance with at least some implementations of the present disclosure. As shown, encoder 100 may include a structure subsystem 310, a partitioning subsystem 320, a prediction subsystem 330, a transform subsystem 340, a filtering subsystem 350, and/or an entropy coding subsystem 360.

FIG. 3(a) is an illustrative diagram of an example next generation video encoder 300 a, arranged in accordance with at least some implementations of the present disclosure. FIG. 3(a) presents a similar encoder to that shown in FIG. 1, and similar elements will not be repeated for the sake of brevity. As shown in FIG. 3(a), encoder 300 a may include pre-analyzer subsystem 310 a, partitioner subsystem 320 a, prediction encoding subsystem 330 a, transform encoder subsystem 340 a, filtering encoding subsystem 350 a, entropy encoder system 360 a, transform decoder subsystem 370 a, and/or unpartitioner subsystem 380 a. Pre-analyzer subsystem 310 a may include content pre-analyzer module 102 and/or adaptive picture organizer module 104. Partitioner subsystem 320 a may include prediction partitions generator module 105, and/or coding partitions generator 107. Prediction encoding subsystem 330 a may include motion estimator module 122, characteristics and motion compensated filtering predictor module 123, and/or intra-directional prediction analyzer and prediction generation module 124. Transform encoder subsystem 340 a may include adaptive transform module 108 and/or adaptive quantize module 109. Filtering encoding subsystem 350 a may include blockiness analyzer and deblock filtering module 117, quality analyzer and quality restoration filtering module 118, motion estimator module 122, characteristics and motion compensated filtering predictor module 123, and/or prediction analyzer and prediction fusion filtering module 126. Entropy coding subsystem 360 a may include adaptive entropy encoder module 110. Transform decoder subsystem 370 a may include adaptive inverse quantize module 112 and/or adaptive inverse transform module 113. Unpartitioner subsystem 380 a may include coding partitions assembler 114 and/or prediction partitions assembler 116.

Partitioner subsystem 320 a of encoder 300 a may include two partitioning subsystems: prediction partitions generator module 105 that may perform analysis and partitioning for prediction, and coding partitions generator module 107 that may perform analysis and partitioning for coding. Another partitioning method may include adaptive picture organizer 104 which may segment pictures into regions or slices may also be optionally considered as being part of this partitioner.

Prediction encoder subsystem 330 a of encoder 300 a may include motion estimator 122 and characteristics and motion compensated filtering predictor 123 that may perform analysis and prediction of “inter” signal, and intra-directional prediction analyzer and prediction generation module 124 that may perform analysis and prediction of “intra” signal. Motion estimator 122 and characteristics and motion compensated filtering predictor 123 may allow for increasing predictability by first compensating for other sources of differences (such as gain, global motion, registration), followed by actual motion compensation. They may also allow for use of data modeling to create synthesized frames (super resolution, and projection) that may allow better predictions, followed by use of actual motion compensation in such frames.

Transform encoder subsystem 340 a of encoder 300 a may perform analysis to select the type and size of transform and may include two major types of components. The first type of component may allow for using parametric transform to allow locally optimal transform coding of small to medium size blocks; such coding however may require some overhead. The second type of component may allow globally stable, low overhead coding using a generic/fixed transform such as the DCT, or a picture based transform from a choice of small number of transforms including parametric transforms. For locally adaptive transform coding, PHT (Parametric Haar Transform) may be used. Transforms may be performed on 2D blocks of rectangular sizes between 4×4 and 64×64, with actual sizes that may depend on a number of factors such as if the transformed data is luma or chroma, inter or intra, and if the transform used is PHT or DCT. The resulting transform coefficients may be quantized, scanned and entropy coded.

Entropy encoder subsystem 360 a of encoder 300 a may include a number of efficient but low complexity components each with the goal of efficiently coding a specific type of data (various types of overhead, motion vectors, or transform coefficients). Components of this subsystem may belong to a generic class of low complexity variable length coding techniques, however, for efficient coding, each component may be custom optimized for highest efficiency. For instance, a custom solution may be designed for coding of “Coded/Not Coded” data, another for “Modes and Ref Types” data, yet another for “Motion Vector” data, and yet another one for “Prediction and Coding Partitions” data. Finally, because a very large portion of data to be entropy coded is “transform coefficient” data, multiple approaches for efficient handling of specific block sizes, as well as an algorithm that may adapt between multiple tables may be used.

Filtering encoder subsystem 350 a of encoder 300 a may perform analysis of parameters as well as multiple filtering of the reconstructed pictures based on these parameters, and may include several subsystems. For example, a first subsystem, blockiness analyzer and deblock filtering module 117 may deblock and dither to reduce or mask any potential block coding artifacts. A second example subsystem, quality analyzer and quality restoration filtering module 118, may perform general quality restoration to reduce the artifacts due to quantization operation in any video coding. A third example subsystem, which may include motion estimator 122 and characteristics and motion compensated filtering predictor module 123, may improve results from motion compensation by using a filter that adapts to the motion characteristics (motion speed/degree of blurriness) of the content. A fourth example subsystem, prediction fusion analyzer and filter generation module 126, may allow adaptive filtering of the prediction signal (which may reduce spurious artifacts in prediction, often from intra prediction) thereby reducing the prediction error which needs to be coded.

Encode controller module 103 of encoder 300 a may be responsible for overall video quality under the constraints of given resources and desired encoding speed. For instance, in full RDO (Rate Distortion Optimization) based coding without using any shortcuts, the encoding speed for software encoding may be simply a consequence of computing resources (speed of processor, number of processors, hyperthreading, DDR3 memory etc.) availability. In such case, encode controller module 103 may be input every single combination of prediction partitions and coding partitions and by actual encoding, and the bitrate may be calculated along with reconstructed error for each case and, based on lagrangian optimization equations, the best set of prediction and coding partitions may be sent for each tile of each frame being coded. The full RDO based mode may result in best compression efficiency and may also be the slowest encoding mode. By using content analysis parameters from content pre-analyzer module 102 and using them to make RDO simplification (not test all possible cases) or only pass a certain percentage of the blocks through full RDO, quality versus speed tradeoffs may be made allowing speedier encoding. Up to now we have described a variable bitrate (VBR) based encoder operation. Encode controller module 103 may also include a rate controller that can be invoked in case of constant bitrate (CBR) controlled coding.

Lastly, pre-analyzer subsystem 310 a of encoder 300 a may perform analysis of content to compute various types of parameters useful for improving video coding efficiency and speed performance. For instance, it may compute horizontal and vertical gradient information (Rs, Cs), variance, spatial complexity per picture, temporal complexity per picture, scene change detection, motion range estimation, gain detection, prediction distance estimation, number of objects estimation, region boundary detection, spatial complexity map computation, focus estimation, film grain estimation etc. The parameters generated by preanalyzer subsystem 310 a may either be consumed by the encoder or be quantized and communicated to decoder 200.

While subsystems 310 a through 380 a are illustrated as being associated with specific example functional modules of encoder 300 a in FIG. 3(a), other implementations of encoder 300 a herein may include a different distribution of the functional modules of encoder 300 a among subsystems 310 a through 380 a. The present disclosure is not limited in this regard and, in various examples, implementation of the example subsystems 310 a through 380 a herein may include the undertaking of only a subset of the specific example functional modules of encoder 300 a shown, additional functional modules, and/or in a different arrangement than illustrated.

FIG. 3(b) is an illustrative diagram of an example next generation video decoder 300 b, arranged in accordance with at least some implementations of the present disclosure. FIG. 3(b) presents a similar decoder to that shown in FIG. 2, and similar elements will not be repeated for the sake of brevity. As shown in FIG. 3(b), decoder 300 b may include prediction decoder subsystem 330 b, filtering decoder subsystem 350 b, entropy decoder subsystem 360 b, transform decoder subsystem 370 b, unpartitioner_2 subsystem 380 b, unpartitioner_1 subsystem 351 b, filtering decoder subsystem 350 b, and/or post-restorer subsystem 390 b. Prediction decoder subsystem 330 b may include characteristics and motion compensated filtering predictor module 213 and/or intra-directional prediction generation module 214. Filtering decoder subsystem 350 b may include deblock filtering module 208, quality restoration filtering module 209, characteristics and motion compensated filtering predictor module 213, and/or prediction fusion filtering module 216. Entropy decoder subsystem 360 b may include adaptive entropy decoder module 202. Transform decoder subsystem 370 b may include adaptive inverse quantize module 203 and/or adaptive inverse transform module 204. Unpartitioner subsystem 380 b may include coding partitions assembler 205 and prediction partitions assembler 207. Post-restorer subsystem 390 b may include content post restorer module 218 and/or adaptive picture re-organizer 217.

Entropy decoding subsystem 360 b of decoder 300 b may perform the inverse operation of the entropy encoder subsystem 360 a of encoder 300 a, i.e., it may decode various data (types of overhead, motion vectors, transform coefficients) encoded by entropy encoder subsystem 360 a using a class of techniques loosely referred to as variable length decoding. Specifically, various types of data to be decoded may include “Coded/Not Coded” data, “Modes and Ref Types” data, “Motion Vector” data, “Prediction and Coding Partitions” data, and “Transform Coefficient” data.

Transform decoder subsystem 370 b of decoder 300 b may perform inverse operation to that of transform encoder subsystem 340 a of encoder 300 a. Transform decoder subsystem 370 b may include two types of components. The first type of example component may support use of the parametric inverse PHT transform of small to medium block sizes, while the other type of example component may support inverse DCT transform for all block sizes. The PHT transform used for a block may depend on analysis of decoded data of the neighboring blocks. Output bitstream 111 and/or input bitstream 201 may carry information about partition/block sizes for PHT transform as well as in which direction of the 2D block to be inverse transformed the PHT may be used (the other direction uses DCT). For blocks coded purely by DCT, the partition/block sizes information may be also retrieved from output bitstream 111 and/or input bitstream 201 and used to apply inverse DCT of appropriate size.

Unpartitioner subsystem 380 b of decoder 300 b may perform inverse operation to that of partitioner subsystem 320 a of encoder 300 a and may include two unpartitioning subsystems, coding partitions assembler module 205 that may perform unpartitioning of coded data and prediction partitions assembler module 207 that may perform unpartitioning for prediction. Further if optional adaptive picture organizer module 104 is used at encoder 300 a for region segmentation or slices, adaptive picture re-organizer module 217 may be needed at the decoder.

Prediction decoder subsystem 330 b of decoder 300 b may include characteristics and motion compensated filtering predictor module 213 that may perform prediction of “inter” signal and intra-directional prediction generation module 214 that may perform prediction of “intra” signal. Characteristics and motion compensated filtering predictor module 213 may allow for increasing predictability by first compensating for other sources of differences (such as gain, global motion, registration) or creation of synthesized frames (super resolution, and projection), followed by actual motion compensation.

Filtering decoder subsystem 350 b of decoder 300 b may perform multiple filtering of the reconstructed pictures based on parameters sent by encoder 300 a and may include several subsystems. The first example subsystem, deblock filtering module 208, may deblock and dither to reduce or mask any potential block coding artifacts. The second example subsystem, quality restoration filtering module 209, may perform general quality restoration to reduce the artifacts due to quantization operation in any video coding. The third example subsystem, characteristics and motion compensated filtering predictor module 213, may improve results from motion compensation by using a filter that may adapt to the motion characteristics (motion speed/degree of blurriness) of the content. The fourth example subsystem, prediction fusion filtering module 216, may allow adaptive filtering of the prediction signal (which may reduce spurious artifacts in prediction, often from intra prediction) thereby reducing the prediction error which may need to be coded.

Post-restorer subsystem 390 b of decoder 300 b is an optional block that may perform further improvement of perceptual quality of decoded video. This processing can be done either in response to quality improvement parameters sent by encoder 100, or it can be standalone decision made at the post-restorer subsystem 390 b. In terms of specific parameters computed at encoder 100 that can be used to improve quality at post-restorer subsystem 390 b may be estimation of film grain noise and residual blockiness at encoder 100 (even after deblocking). As regards the film grain noise, if parameters can be computed and sent via output bitstream 111 and/or input bitstream 201 to decoder 200, then these parameters may be used to synthesize the film grain noise. Likewise, for any residual blocking artifacts at encoder 100, if they can be measured and parameters sent via output bitstream 111 and/or bitstream 201, post-restorer subsystem 390 b may decode these parameters and may use them to optionally perform additional deblocking prior to display. In addition, encoder 100 also may have access to scene change, spatial complexity, temporal complexity, motion range, and prediction distance information that may help in quality restoration in post-restorer subsystem 390 b.

While subsystems 330 b through 390 b are illustrated as being associated with specific example functional modules of decoder 300 b in FIG. 3(b), other implementations of decoder 300 b herein may include a different distribution of the functional modules of decoder 300 b among subsystems 330 b through 390 b. The present disclosure is not limited in this regard and, in various examples, implementation of the example subsystems 330 b through 390 b herein may include the undertaking of only a subset of the specific example functional modules of decoder 300 b shown, additional functional modules, and/or in a different arrangement than illustrated.

FIG. 4 is an illustrative diagram of modified prediction reference pictures 400, arranged in accordance with at least some implementations of the present disclosure. As shown, the output of quality analyzer and quality restoration filtering may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like).

The proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may implement P-picture coding using a combination of Morphed Prediction References 428 through 438 (MR0 through 3) and/or Synthesized Prediction References 412 and 440 through 446 (S0 through S3, MR4 through 7). NGV coding involves use of three picture types referred to as I-pictures, P-pictures, and F/B-pictures. In the illustrated example, the current picture to be coded (a P-picture) is shown at time t=4. During coding, the proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may use one or more of four previously decoded references R0 412, R1 414, R2 416, and R3 418. Unlike other solutions that may simply use these references directly for prediction, the proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may generate modified (morphed or synthesized) references from such previously decoded references and then use motion compensated coding based at least in part on such generated modified (morphed or synthesized) references.

As will be described in greater detail below, in some examples, the proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may incorporate a number of components and the combined predictions generated by these components in an efficient video coding algorithm. For example, proposed implementation of the NGV coder may include one or more of the following features: 1. Gain Compensation (e.g., explicit compensation for changes in gain/brightness in a scene); 2. Blur Compensation: e.g., explicit compensation for changes in blur/sharpness in a scene; 3. Dominant/Global Motion Compensation (e.g., explicit compensation for dominant motion in a scene); 4. Registration Compensation (e.g., explicit compensation for registration mismatches in a scene); 5. Super Resolution (e.g., explicit model for changes in resolution precision in a scene); 6. Projection (e.g., explicit model for changes in motion trajectory in a scene); the like, and/or combinations thereof.

In the illustrated example, if inter-prediction is applied, a characteristics and motion filtering predictor module may apply motion compensation to a current picture 410 (e.g., labeled in the figure as P-pic (carr)) as part of the local decode loop. In some instances, such motion compensation may be based at least in part on future frames (not shown) and/or previous frame R0 412 (e.g., labeled in the figure as R0), previous frame R1 414 (e.g., labeled in the figure as R1), previous frame R2 416 (e.g., labeled in the figure as R2), and/or previous frame R3 418 (e.g., labeled in the figure as R3).

For example, in some implementations, prediction operations may include inter- and/or intra-prediction. Inter-prediction may be performed by one or more modules including a morphing analyzer and generation module and/or a synthesizing analyzer and generation module. Such a morphing analyzer and generation module may analyze a current picture to determine parameters for changes in blur 420 (e.g., labeled in the figure as Blur par), changes in gain 422 (e.g., labeled in the figure as Gain par and explained in detail below), changes in registration 424 (e.g., labeled in the figure as Reg par), and changes in dominant motion 426 (e.g., labeled in the figure as Dom par), or the like with respect to a reference frame or frames with which it is to be coded.

The determined morphing parameters 420, 422, 424, and/or 426 may be used to generate morphed reference frames. Such generated morphed reference frames may be stored and may be used for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame. In the illustrated example, determined morphing parameters 420, 422, 424, and/or 426 may be used to generate morphed reference frames, such as blur compensated morphed reference frame 428 (e.g., labeled in the figure as MR3 b), gain compensated morphed reference frame 430 (e.g., labeled in the figure as MR2 g), gain compensated morphed reference frame 432 (e.g., labeled in the figure as MR1 g), registration compensated morphed reference frame 434 (e.g., labeled in the figure as MR1 r), dominant motion compensated morphed reference frame 436 (e.g., labeled in the figure as MR0 d), and/or registration compensated morphed reference frame 438 (e.g., labeled in the figure as MR0 r), the like or combinations thereof, for example.

Similarly, a synthesizing analyzer and generation module may generate super resolution (SR) pictures 440 (e.g., labeled in the figure as S0 (which is equal to previous frame R0 412), S1, S2, S3) and projected interpolation (PI) pictures 442 (e.g., labeled in the figure as PE) or the like for determining motion vectors for efficient motion compensated prediction in these frames. Such generated synthesized reference frames may be stored and may be used for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

Additionally or alternatively, the determined morphing parameters 420, 422, 424, and/or 426 may be used to morph the generated synthesis reference frames super resolution (SR) pictures 440 and/or projected interpolation (PI) pictures 442. For example, a synthesizing analyzer and generation module may generate morphed registration compensated super resolution (SR) pictures 444 (e.g., labeled in the figure as MR4 r, MR5 r, and MR6 r) and/or morphed registration compensated projected interpolation (PI) pictures 446 (e.g., labeled in the figure as MR7 r) or the like from the determined registration morphing parameter 424. Such generated morphed and synthesized reference frames may be stored and may be used for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

In some implementations, changes in a set of characteristics (such as gain, blur, dominant motion, registration, resolution precision, motion trajectory, the like, or combinations thereof, for example) may be explicitly computed. Such a set of characteristics may be computed in addition to local motion. In some cases previous and next pictures/slices may be utilized as appropriate; however, in other cases such a set of characteristics may do a better job of prediction from previous picture/slices. Further, since there can be error in any estimation procedure, (e.g., from multiple past or multiple past and future pictures/slices) a modified reference frame associated with the set of characteristics (such as gain, blur, dominant motion, registration, resolution precision, motion trajectory, the like, or combinations thereof, for example) may be selected that yields the best estimate. Thus, the proposed approach that utilizes modified reference frames associated with the set of characteristics (such as gain, blur, dominant motion, registration, resolution precision, motion trajectory, the like, or combinations thereof, for example) may explicitly compensate for differences in these characteristics. The proposed implementation may address the problem of how to improve the prediction signal, which in turn allows achieving high compression efficiency in video coding.

As discussed, in some examples, inter-prediction may be performed. In some examples, up to 4 decoded past and/or future pictures and several morphing/synthesis predictions may be used to generate a large number of reference types (e.g., reference pictures). For instance in ‘inter’ mode, up to nine reference types may be supported in P-pictures, and up to ten reference types may be supported for F/B-pictures. Further, ‘multi’ mode may provide a type of inter prediction mode in which instead of 1 reference picture, 2 reference pictures may be used and P- and F/B-pictures respectively may allow 3, and up to 8 reference types. For example, prediction may be based on a previously decoded frame generated using at least one of a morphing technique or a synthesizing technique. In such examples, the bitstream may include a frame reference, morphing parameters, or synthesizing parameters associated with the prediction partition.

Some of the morphing and synthesis techniques other than the gain compensation (described in more detail below) are as follows.

Blur/Registration Compensation

By one detailed example, methods for compensation of Registration and Blur are described below although the terms can be used interchangeably.

Registration Compensation:

A stationary video camera imaging a scene might still result in shaky or unstable video that differs frame to frame due to environmental factors (such as wind), vibrations from nearby objects, a shaky hand, or a jittery capture process, rather than global movement of the scene or motion of large objects in the scene. This results in frame to frame registration differences, the compensation of which (in addition to other forms of compensation such as gain, global/dominant motion, and local motion compensation) may result in improvement of compression efficiency of video coding.

For computing registration parameters between a current frame and a previous reference frame, Wiener filtering can be employed. Let x(n) be the input signal, y(n) be the output, and h(n) represent filter coefficients.

$\begin{matrix} {{{Filter}\mspace{14mu} {output}\text{:}\mspace{14mu} {y(n)}} = {\sum\limits_{k = 0}^{N - 1}{{h(k)}{x\left( {n - k} \right)}}}} & (4) \\ {{{Error}\mspace{14mu} {signal}\text{:}\mspace{14mu} {e(n)}} = {{d(n)} - {y(n)}}} & (5) \end{matrix}$

In matrix notation, h is the vector of filter coefficients. The cross-correlation row vector (between source frame and reference frame):

R _(dx) =E[d(n)x(n)^(T)]  (6)

The autocorrelation matrix (based on block data):

R _(xx) =E[x(n)x(n)^(T)]  (7)

The Wiener Hopf equation to solve for h as then as follows. The Wiener Hopf equation determines optimum filter coefficients in mean square error, and the resulting filter is called the ‘wiener’ filter.

h=R _(xx) ⁻¹ R _(dx)  (8)

Blur Compensation:

A fast camera pan of a scene may, due to charge integration, result in blurry image. Further, even if a camera is still, or in motion, if a scene involves fast moving objects, for instance football players in a football game, the objects can appear blurry as the temporal resolution of the imaging is not sufficient. In both of the aforementioned cases, compensation of blur prior to or in conjunction with other forms of compensation, may improve compression efficiency of video coding.

For motion blur estimation, a Lucy-Richardson method can be used. It is an iterative algorithm for successively computing reduced blur frame (X) at iteration i, from Y the source frame, using B, the blur operator (blur frame using estimated blur vectors) and B* an adjoint operator. The operator B* can be roughly thought of as the same as B as B* can be replaced by B resulting in roughly the same visual quality.

$\begin{matrix} {{X_{i + 1}{X_{i} \cdot {B^{*}\left( \frac{Y}{B\left( X_{i} \right)} \right)}}},{X_{0} = Y}} & (9) \end{matrix}$

Global/Dominant Motion Compensation

By one detailed example, since global motion in video can present a challenge to block based on prediction (due to larger prediction resulting from a translatory motion model, and a significant amount of motion vector overhead), an alternative approach was developed that directly estimates/compensates global motion due to its potential of being able to better adapt to nontranslatory/complex motion, and a more compact representation of motion parameters is now available as needed such as once per picture. Among the choice of motion models for Global Motion, the two models that offer significant benefits are the Affine Model, and the Perspective Model. The affine model uses six parameters, and is able to address a large range of complex motions, while the perspective model is more complex and flexible, but can use up to eight parameters. The affine model may be sufficient for many cases and can allows global compensation for motion of types such as translation, zoom, shear, and rotation.

Mathematically the affine transform process is described by the following equations that use affine parameters a, b, c, d, e, f to map a set of points (x, y) in previous frame to a modified set of points (x′, y′).

x _(i) ′=a·x _(i) +b·y _(i) +c  (10)

y _(i) ′=d·x _(i) +e·y _(i) +f  (11)

For efficient transmission of global motion parameters to the decoder, the model is transmitted as 3 motion trajectories, one for top-left corner of the picture, one for top-right corner of the picture, and one for bottom-left corner of the picture. Affine parameters are calculated (fixed point arithmetic) for a virtual picture which is assumed to be of width and height of nearest power of 2 number which greater than the coded picture. This removes divisions required at the decoder.

Assume for three vertices (x0, y0), (x1, y1), (x2, y2) corresponding motion trajectories mt0, mt1, and mt2 are given and can be represented as (dx0, dy0), (dx1, dy1), and (dx2, dy2) say in ⅛ pel units. The affine parameters A, B, C, D, E, and F can then be calculated as follows.

C=dx0  (12)

F=dy0  (13)

A=W′*((x1+dx1)−(x0+dx0))/W  (14)

B=W′*((x2+dx2)−(x0+dx0))/W  (15)

D=H′*(((y1+dy1)−(y0+dy0))/H)  (16)

E=H′*(((y2+dy2)−(y0+dy0))/H)  (17)

While use of affine model based Global Motion Estimation/Compensation (GME/C) was a notable improvement for scenes with global motion over use of block based translatory motion, in reality both block based local and global motion is combined for best coding efficiency results. Further, the affine model can also be applied for motion compensation of non-overlapping tiles, or regions/objects in a scene. This results in multiple global motion parameter sets, and the process is referred to as performing dominant motion compensation (DC).

Super Resolution Synthesis

Referring to FIG. 5, besides morphed prediction (gain, blur/registration, global/dominant motion) pictures, synthesized prediction (super resolution (SR), and projected interpolation (PI)) pictures are also supported. In general, super resolution (SR) is a technique used to create a high resolution reconstruction image of a single video frame using many past frames of the video to help fill in the missing information. The goal of a good super resolution technique is to be able to produce a reconstructed image better than up-sampling alone when tested with known higher resolution video. The super resolution generation technique herein may use coded video codec data to create an in-loop super resolution frame. The in-loop super resolution frame is used again within the coding loop as the name implies. The use of SR in a coding loop provides significant gain in the low resolution video coding and thus in the reconstructed super resolution video. This process uses an algorithm that combines and uses codec information (like modes intra, motion, coefficients. etc.) along with current decoded frames and past frames (or future frames if available) to create a high resolution reconstruction of the current frame being decoded. Thus the proposed technique is fast and produces good visual quality.

For sequences where the movement is slow and content is fairly detailed (many edges, texture, and so forth), the ability to generate super resolution frames for use in prediction can provide greater motion compensation accuracy, and thereby permit a higher degree of compression. As shown in FIG. 5, a process 500 is diagrammed where the principle of generation of SR prediction is applied to P-pictures, which is a type of synthesized prediction used by NGV coding. In this case, both the encoder and decoder generate the synthesized frame from previously available decoded frames and data. A SR frame 518 double the size of frame ‘n’ 504 in both the horizontal and vertical dimensions is generated by blending upsampled decoded P frame 516 at ‘n’, and motion compensated picture 514 constructed by using a previous SR frame 508 at ‘n−1’. The previous SR frame 508 is de-interleaved and combined with the motion estimation values at de-interleaved blocks 510 by using the current P-picture 504. The blocks 510 are used for motion compensation to form motion compensated, de-interleaved blocks 512, which are then re-interleaved onto a block to form the motion compensated picture 514. Multi reference prediction is also shown for the P-picture at frame n+1 by arrow D.

Projected Interpolation Synthesis

A picture sequence such as frame sequence 400, may also be used to illustrate the principle of generation and use of projected interpolation frames (PI-pictures) shown as frame PE 442 on FIG. 4. For simplicity, assume that F-pictures behave like B-pictures and can reference two anchors, one in the past, and another in the future (this is only one example case). Then, for every F-picture, a co-located interpolated frame can be generated by a specific type of interpolation referred to as projected interpolation using the future and the past reference anchor frames. Projected interpolation takes object motion into account that has non-constant (or non-linear) velocity over a sequence of frames, or relatively large motions. PI uses weighting factors depending on the distance from the co-located or current frame to be replaced and to each of the two reference frames being used for the interpolation. Thus, a best fit motion vector is determined that is proportional to these two distances, with the closer reference usually given more weight. To accomplish this, a two scale factor (x factor and y factor) are determined by least square estimations for one example. Further motion compensation may then be allowed to adjust small mismatches.

For instance, for F-pictures at a time ‘n+1’, a PI-picture is generated co-located at this time using anchor or reference frames at times ‘n’ and ‘n+2’. Likewise for F-pictures at times, ‘n+3’, and ‘n+4’, corresponding PI-pictures can be generated using anchor frames at times ‘n+2’ and ‘n+5’. This process may repeat for each future F-picture as a PI-picture is synthesized to correspond in time to each F-picture. The corresponding synthesized PI-pictures can then be used as a third reference in the same or similar way the two reference anchors were going to be used for prediction. Some prediction partitions may use prediction references directly while others may use them implicitly such as to generate bi-prediction. Thus, synthesized PI-pictures can be used for prediction, instead of the original F-pictures, with multi-reference prediction and with two reference anchors.

Turning now to the system to implement these modifications to reference frames, and as mentioned previously, with ever increasing resolution of video to be compressed and expectation of high video quality, the corresponding bitrate/bandwidth required for coding using existing video coding standards such as H.264 or even evolving standards such as H.265/HEVC, is relatively high. The aforementioned standards use expanded forms of traditional approaches to implicitly address the insufficient compression/quality problem, but often the results are limited.

The proposed implementation improves video compression efficiency by improving interframe prediction, which in turn reduces interframe prediction difference (error signal) that needs to be coded. The less the amount of interframe prediction difference to be coded, the less the amount of bits required for coding, which effectively improves the compression efficiency as it now takes less bits to store or transmit the coded prediction difference signal. Instead of being limited to motion predictions only, the proposed NCV codec may be highly adaptive to changing characteristics (such as gain, blur, dominant motion, registration, resolution precision, motion trajectory, the like, or combinations thereof, for example) of the content by employing, in addition or in the alternative to motion compensation, approaches to explicitly compensate for changes in the characteristics of the content. Thus by explicitly addressing the root cause of the problem the NGV codec may address a key source of limitation of standards based codecs, thereby achieving higher compression efficiency.

This change in interframe prediction output may be achieved due to ability of the proposed NCV codec to compensate for a wide range of reasons for changes in the video content. Typical video scenes vary from frame to frame due to many local and global changes (referred to herein as characteristics). Besides local motion, there are many other characteristics that are not sufficiently addressed by current solutions that may be addressed by the proposed implementation.

The proposed implementation may explicitly compute changes in a set of characteristics (such as gain, blur, dominant motion, registration, resolution precision, motion trajectory, the like, or combinations thereof, for example) in addition to local motion, and thus may do a better job of prediction from previous picture/slices than only using local motion prediction from previous and next pictures/slices. Further, since there can be error in any estimation procedure, from multiple past or multiple past and future pictures/slices the NGV coder may choose the frame that yields the best by explicitly compensating for differences in various characteristics.

In operation, the proposed implementation of the NGV coder (e.g., encoder 100 and/or decoder 200) may operate so that prediction mode and/or reference type data may be defined using symbol-run coding or a codebook or the like. The prediction mode and/or reference type data may be transform encoded using content adaptive or discrete transform in various examples to generate transform coefficients. Also as discussed, data associated with partitions (e.g., the transform coefficients or quantized transform coefficients), overhead data (e.g., indicators as discussed herein for transform type, adaptive transform direction, and/or a transform mode), and/or data defining the partitions and so on may be encoded (e.g., via an entropy encoder) into a bitstream. The bitstream may be communicated to a decoder, which may use the encoded bitstream to decode video frames for display. On a local basis (such as block-by-block within a macroblock or a tile, or on a partition-by-partition within a tile or a prediction unit, or fragments within a superfragment or region) the best mode may be selected for instance based at least in part on Rate Distortion Optimization (RDO) or based at least in part on pre-analysis of video, and the identifier for the mode and needed references may be encoded within the bitstream for use by the decoder.

As explained above, various prediction modes are allowed in P- and F-pictures and are exemplified below, along with how they relate to the reference types. Both the P-picture and F-picture tiles are partitioned into smaller units, and a prediction mode from among “skip”, “auto”, “inter”, and “multi”, is assigned to each partition of a tile. The entire list of modes in Table 1 also includes ‘intra’ that refers to spatial prediction from neighboring blocks as compared to temporal motion compensated prediction. The “split” mode refers to a need for further division or further partitioning. For partitions that use “inter” or “multi” mode, further information about the used reference is needed and is shown for P-pictures in Table 2(a) and Table 2(b) respectively, while for F-pictures, in Table 3(a) and Table 3(b) respectively.

Prediction modes and reference types analyzer 125 (FIG. 1) may allow for selection of prediction modes from among, “skip”, “auto”, “inter”, “multi”, and “intra” as mentioned above, and for each partition of a tile, all of which may apply to P- and F-pictures; this is shown in Table 1 below. In addition to prediction modes, it also allows for selection of reference types that can be different depending on “inter” or “multi” mode, as well as for P- and F-pictures; the detailed list of ref types is shown in Tables 2(a) and 2(b) for P-pictures, and Tables 3(a), 3(b), 3(c), and 3(d) for F-pictures.

Tables 1 through 3(d), shown below, illustrate one example of codebook entries for a current frame (curr_pic) being, or that will be, reconstructed. A full codebook of entries may provide a full or substantially full listing of all possible entries and coding thereof. In some examples, the codebook may take into account constraints as described above. In some examples, data associated with a codebook entry for prediction modes and/or reference types may be encoded in a bitstream for use at a decoder as discussed herein.

TABLE 1 Prediction modes for Partitions of a Tile in P-and F- pictures (already explained above): No. Prediction mode 0. Intra 1. Skip 2. Split 3. Auto 4. Inter 5. Multi

TABLE 2(a) Ref Types for Partitions of Tile that have “inter” mode in P-pictures: No. Ref Types for partitions with “inter” mode 0. MR0n (=past SR0) 1. MR1n 2. MR2n 3. MR3n 4. MR5n (past SR1) 5. MR6n (past SR2) 6. MR7n (past SR3) 7. MR0d 8. MR0g

TABLE 2(b) Ref Types for Partitions of Tile that have “multi” mode in P-pictures: Ref Types for partitions with “multi” mode No. (first Ref Past none, second Ref:) 0. MR1n 1. MR2n 2. MR3n where table 2(b) is directed to a specific combination of references including a past reference without parameters and one of the references on the table as indicated by the table heading.

TABLE 3(a) Ref Types for Partitions of Tile that have “inter” mode in F-pictures: No. Ref Types for partitions with “inter” mode 0. MR0n 1. MR7n (=proj F) 2. MR3n (=future SR0) 3. MR1n 4. MR4n (=Future SR1) 5. MR5n (=Future SR2) 6. MR6n (=Future SR3) 7. MR3d 8. MR0g/MR3g where proj F refers to PI, and line 8, by one example, includes two optional references.

TABLE 3(b) Ref Types for Partitions of Tile that have “multi” mode and Dir 0 in F-pictures: Ref Types for partitions with “multi” mode No. and Dir 0 (first Ref Past none, second Ref:) 0. MR3n (=future SR0) 1. MR1n 2. MR4n (=Future SR1) 3. MR5n (=Future SR2) 4. MR6n (=Future SR3) 5. MR7n (=proj F) 6. MR3d 7. MR3g where Dir refers to a sub-mode that is a fixed, or partially fixed, combination of references for multi-mode for F-frames, such that Dir 0 above, and Dir 1 and Dir 2 below, each refer to a combination of references. Thus, as shown in Table 3(b), Dir 0 may refer to a combination of a past reference (which may be a particular reference at a particular time (reference 3 at n+2 for example) and combined with one of the references from the table. Dir on the tables below are similar and as explained in the heading of the table.

TABLE 3(c) Ref Types for Partitions of Tile that have “multi” mode and Dir 1 in F-pictures: Ref Types for partitions with “multi” mode No. and Dir 1 (first Ref MR0n, second Ref:) 0. MR7n (=proj F)

TABLE 3(d) Ref Types for Partitions of Tile that have “multi” mode and Dir 2 in F-pictures: Ref Types for partitions with “multi” mode No. and Dir 2 (first Ref MR3n, second Ref:) 0. MR7n (=proj F)

FIG. 6 is an illustrative diagram of an example encoder prediction subsystem 330 for performing characteristics and motion compensated prediction, arranged in accordance with at least some implementations of the present disclosure. As illustrated, encoder prediction subsystem 330 of encoder 600 may include decoded picture buffer 119, morphing analyzer and generation module 120, synthesizing analyzer and generation module 121, motion estimator module 122, and/or characteristics and motion compensated precision adaptive filtering predictor module 123.

As shown, the output of quality analyzer and quality restoration filtering may be transmitted to decoded picture buffer 119. In some examples, the output of quality analyzer and quality restoration filtering may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). In encoder 600, prediction operations may include inter- and/or intra-prediction. As shown in FIG. 6, inter-prediction may be performed by one or more modules including morphing analyzer and generation module 120, synthesizing analyzer and generation module 121, and/or characteristics and motion compensated precision adaptive filtering predictor module 123.

Morphing analyzer and generation module 120 may include a morphing types analyzer (MTA) and a morphed pictures generator (MPG) 610 as well as a morphed prediction reference (MPR) buffer 620. Morphing types analyzer (MTA) and a morphed pictures generator (MPG) 610 may analyze a current picture to determine parameters for changes in gain, changes in dominant motion, changes in registration, and changes in blur with respect to a reference frame or frames with which it is to be coded. The determined morphing parameters may be quantized/de-quantized and used (e.g., by morphing analyzer and generation module 120) to generate morphed reference frames. Such generated morphed reference frames may be stored in morphed prediction reference (MPR) buffer 620 and may be used by motion estimator module 122 for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

Synthesizing analyzer and generation module 121 may include a synthesis types analyzer (STA) and synthesized pictures generator (SPG) 630 as well as a synthesized prediction reference (SPR) buffer 640. Synthesis types analyzer (STA) and synthesized pictures generator 630 may generate super resolution (SR) pictures and projected interpolation (PI) pictures or the like for determining motion vectors for efficient motion compensated prediction in these frames. Such generated synthesized reference frames may be stored in synthesized prediction reference (SPR) buffer 640 and may be used by motion estimator module 122 for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

Motion estimator module 122 may generate motion vector data based at least in part on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame. In some examples, motion estimator module 122 may be considered an inter-prediction module. For example, the motion vector data may be used for inter-prediction. If inter-prediction is applied, characteristics and motion filtering predictor module 123 may apply motion compensation as part of the local decode loop as discussed.

FIG. 7 is an illustrative diagram of an example decoder prediction subsystem 701 for performing characteristics and motion compensated prediction, arranged in accordance with at least some implementations of the present disclosure. As illustrated, decoder prediction subsystem 701 of decoder 700 may include decoded picture buffer 210, morphing analyzer and generation module 211, synthesizing analyzer and generation module 212, and/or characteristics and motion compensated precision adaptive filtering predictor module 213.

As shown, the output of quality restoration filtering module may be transmitted to decoded picture buffer (or frame selector control) 210. In some examples, the output of quality restoration filtering module may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). As discussed, compensation due to prediction operations may include inter- and/or intra-prediction compensation. As shown, inter-prediction compensation may be performed by one or more modules including morphing analyzer and generation module 211, synthesizing analyzer and generation module 212, and/or characteristics and motion compensated precision adaptive filtering predictor module 213.

Morphing analyzer and generation module 211 may include a morphed pictures generator (MPG) 710 as well as a morphed prediction reference (MPR) buffer 720. Morphed pictures generator (MPG) 710 may use de-quantized morphing parameters (e.g., determined from input bitstream) to generate morphed reference frames. Such generated morphed reference frames may be stored in morphed prediction reference (MPR) buffer 720 and may be used by characteristics and motion compensated precision adaptive filtering predictor module 213.

Synthesizing analyzer and generation module 212 may include a synthesized pictures generator (SPG) 730 as well as a synthesized prediction reference (SPR) buffer 740. Synthesized pictures generator 730 may be configured to generate one or more types of synthesized prediction reference pictures such as super resolution (SR) pictures and projected interpolation (PI) pictures or the like based at least in part on parameters determined from input bitstream 201. Such generated synthesized reference frames may be stored in synthesized prediction reference (SPR) buffer 740 and may be used by motion compensated filtering predictor module 213.

If inter-prediction is applied, characteristics and motion compensated filtering predictor module 213 may apply motion compensation based at least in part on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame.

Referring to FIG. 8, an illustrative diagram of another example encoder prediction subsystem 330 for performing characteristics and motion compensated prediction is arranged in accordance with at least some implementations of the present disclosure. As illustrated, encoder prediction subsystem 330 of encoder 800 may include decoded picture buffer 119, morphing analyzer and generation module 120, synthesizing analyzer and generation module 121, motion estimator module 122, and/or characteristics and motion compensated precision adaptive filtering predictor module 123.

As shown, the output of quality analyzer and quality restoration filtering may be transmitted to decoded picture buffer 119. In some examples, the output of quality analyzer and quality restoration filtering may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). In encoder 800, prediction operations may include inter- and/or intra-prediction. As shown in FIG. 8, inter-prediction may be performed by one or more modules including morphing analyzer and generation module 120, synthesizing analyzer and generation module 121, and/or characteristics and motion compensated precision adaptive filtering predictor module 123.

Morphing analyzer and generation module 120 may include a morphing types analyzer (MTA) and a morphed pictures generator (MPG) 610 as well as a morphed prediction reference (MPR) buffer 620. Morphing types analyzer (MTA) and a morphed pictures generator (MPG) 610 may be configured to analyze and/or generate one or more types of modified prediction reference pictures.

For example, morphing types analyzer (MTA) and a morphed pictures generator (MPG) 610 may include Gain Estimator and Compensated Prediction Generator 805, Blur Estimator and Compensated Prediction Generator 810, Dominant Motion Estimator and Compensated Prediction Generator 815, Registration Estimator and Compensated Prediction Generator 820, the like and/or combinations thereof. Gain Estimator and Compensated Prediction Generator 805 may be configured to analyze and/or generate morphed prediction reference pictures that are adapted to address changes in gain. Blur Estimator and Compensated Prediction Generator 810 may be configured to analyze and/or generate morphed prediction reference pictures that are adapted to address changes in blur. Dominant Motion Estimator and Compensated Prediction Generator 815 may be configured to analyze and/or generate morphed prediction reference pictures that are adapted to address changes in dominant motion. Registration Estimator and Compensated Prediction Generator 820 may be configured to analyze and/or generate morphed prediction reference pictures that are adapted to address changes in registration.

Morphing types analyzer (MTA) and a morphed pictures generator (MPG) 610 may store such generated morphed reference frames in morphed prediction reference (MPR) buffer 620. For example, morphed prediction reference (MPR) buffer 620 may include Gain Compensated (GC) Picture/s Buffer 825, Blur Compensated (BC) Picture/s Buffer 830, Dominant Motion Compensated (DC) Picture/s Buffer 835, Registration Compensated (RC) Picture/s Buffer 840, the like and/or combinations thereof. Gain Compensated (GC) Picture/s Buffer 825 may be configured to store morphed reference frames that are adapted to address changes in gain. Blur Compensated (BC) Picture/s Buffer 830 may be configured to store morphed reference frames that are adapted to address changes in blur. Dominant Motion Compensated (DC) Picture/s Buffer 835 may be configured to store morphed reference frames that are adapted to address changes in dominant motion. Registration Compensated (RC) Picture/s Buffer 840 may be configured to store morphed reference frames that are adapted to address changes in registration.

Synthesizing analyzer and generation module 121 may include a synthesis types analyzer (STA) and synthesized pictures generator 630 as well as a synthesized prediction reference (SPR) buffer 640. Synthesis types analyzer (STA) and synthesized pictures generator 530 may be configured to analyze and/or generate one or more types of synthesized prediction reference pictures. For example, synthesis types analyzer (STA) and synthesized pictures generator 630 may include Super Resolution Filter Selector & Prediction Generator 845, Projection Trajectory Analyzer & Prediction Generator 850, the like and/or combinations thereof. Super Resolution Filter Selector & Prediction Generator 845 may be configured to analyze and/or generate a super resolution (SR) type of synthesized prediction reference pictures. Projection Trajectory Analyzer & Prediction Generator 850 may be configured to analyze and/or generate a projected interpolation (PI) type of synthesized prediction reference pictures.

Synthesis types analyzer (STA) and synthesized pictures generator 630 may generate super resolution (SR) pictures and projected interpolation (PI) pictures or the like for efficient motion compensated prediction in these frames. Such generated synthesized reference frames may be stored in synthesized prediction reference (SPR) buffer 640 and may be used by motion estimator module 122 for computing motion vectors for efficient motion (and characteristics) compensated prediction of a current frame.

For example, synthesized prediction reference (SPR) buffer 640 may include Super Resolution (SR) Picture Buffer 855, Projected Interpolation (PI) Picture Buffer 860, the like and/or combinations thereof. Super Resolution (SR) Picture Buffer 855 may be configured to store synthesized reference frames that are generated for super resolution (SR) pictures. Projected Interpolation (PI) Picture Buffer 860 may be configured to store synthesized reference frames that are generated for projected interpolation (PI) pictures.

Motion estimator module 122 may generate motion vector data based on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame. In some examples, motion estimator module 122 may be considered an inter-prediction module. For example, the motion vector data may be used for inter-prediction. If inter-prediction is applied, characteristics and motion filtering predictor module 123 may apply motion compensation as part of the local decode loop as discussed.

FIG. 9 is an illustrative diagram of another example decoder prediction subsystem 701 for performing characteristics and motion compensated prediction, arranged in accordance with at least some implementations of the present disclosure. As illustrated, decoder prediction subsystem 701 may include decoded picture buffer 210, morphing analyzer and generation module 211, synthesizing analyzer and generation module 212, and/or characteristics and motion compensated precision adaptive filtering predictor module 213.

As shown, the output of quality restoration filtering module may be transmitted to decoded picture buffer 210. In some examples, the output of quality restoration filtering module may be a final reconstructed frame that may be used for prediction for coding other frames (e.g., the final reconstructed frame may be a reference frame or the like). As discussed, compensation due to prediction operations may include inter- and/or intra-prediction compensation. As shown, inter-prediction compensation may be performed by one or more modules including morphing analyzer and generation module 211, synthesizing analyzer and generation module 212, and/or characteristics and motion compensated precision adaptive filtering predictor module 213.

Morphing generation module 212 may include a morphed pictures generator (MPG) 710 as well as a morphed prediction reference (MPR) buffer 720. Morphed pictures generator (MPG) 710 may use de-quantized morphing parameters (e.g., determined from input bitstream) to generate morphed reference frames. For example, morphed pictures generator (MPG) 710 may include Gain Compensated Prediction Generator 905, Blur Compensated Prediction Generator 910, Dominant Motion Compensated Prediction Generator 915, Registration Compensated Prediction Generator 920, the like and/or combinations thereof. Gain Compensated Prediction Generator 905 may be configured to generate morphed prediction reference pictures that are adapted to address changes in gain as described in greater detail below. Blur Compensated Prediction Generator 910 may be configured to generate morphed prediction reference pictures that are adapted to address changes in blur. Dominant Motion Compensated Prediction Generator 915 may be configured to generate morphed prediction reference pictures that are adapted to address changes in dominant motion. Registration Compensated Prediction Generator 920 may be configured to generate morphed prediction reference pictures that are adapted to address changes in registration.

Morphed pictures generator (MPG) 710 may store such generated morphed reference frames in morphed prediction reference (MPR) buffer 720. For example, morphed prediction reference (MPR) buffer 720 may include Gain Compensated (GC) Picture/s Buffer 925, Blur Compensated (BC) Picture/s Buffer 930, Dominant Motion Compensated (DC) Picture/s Buffer 935, Registration Compensated (RC) Picture/s Buffer 940, the like and/or combinations thereof. Gain Compensated (GC) Picture/s Buffer 925 may be configured to store morphed reference frames that are adapted to address changes in gain. Blur Compensated (BC) Picture/s Buffer 930 may be configured to store morphed reference frames that are adapted to address changes in blur. Dominant Motion Compensated (DC) Picture/s Buffer 935 may be configured to store morphed reference frames that are adapted to address changes in dominant motion. Registration Compensated (RC) Picture/s Buffer 940 may be configured to store morphed reference frames that are adapted to address changes in registration.

Synthesizing generation module 212 may include a synthesized pictures generator 630 as well as a synthesized prediction reference (MPR) buffer 740. Synthesized pictures generator 730 may be configured to generate one or more types of synthesized prediction reference pictures such as super resolution (SR) pictures and projected interpolation (PI) pictures or the like based on parameters determined from input bitstream 201. Such generated synthesized reference frames may be stored in synthesized prediction reference (SPR) buffer 740 and may be used by motion compensated filtering predictor module 213. For example, synthesized pictures generator 730 may include Super Resolution Picture Generator 945, Projection Trajectory Picture Generator 950, the like and/or combinations thereof. Super Resolution Picture Generator 945 may be configured to generate a super resolution (SR) type of synthesized prediction reference pictures. Projection Trajectory Picture Generator 950 may be configured to generate a projected interpolation (PI) type of synthesized prediction reference pictures.

Synthesized pictures generator 730 may generate super resolution (SR) pictures and projected interpolation (PI) pictures or the like for efficient motion compensated prediction in these frames. Such generated synthesized reference frames may be stored in synthesized prediction reference (SPR) buffer 740 and may be used by characteristics and motion compensated filtering predictor module 213 for efficient motion (and characteristics) compensated prediction of a current frame.

For example, synthesized prediction reference (SPR) buffer 740 may include Super Resolution (SR) Picture Buffer 955, Projected Interpolation (PI) Picture Buffer 960, the like and/or combinations thereof. Super Resolution (SR) Picture Buffer 955 may be configured to store synthesized reference frames that are generated for super resolution (SR) pictures. Projected Interpolation (PI) Picture Buffer 960 may be configured to store synthesized reference frames that are generated for projected interpolation (PI) pictures.

If inter-prediction is applied, characteristics and motion compensated filtering predictor module 213 may apply motion compensation based on morphed reference frame(s) and/or super resolution (SR) pictures and projected interpolation (PI) pictures along with the current frame.

Gain Compensation

Referring to FIGS. 10-21, as mentioned above a reference frame may be modified for gain compensation to provide accurate brightness for the frame, which can then be used in motion compensation calculations that use brightness parameters. As shown in the figures, gain compensation may be desired when there is a sudden change in brightness due to flash bulbs, activation or deactivation of a bright light, strobe lights, explosions, and so forth, as well as a fade in or fade-out. In the past, only techniques for global brightness change have been disclosed, where, for example, a single brightness error, residual, or adjustment value is used for an entire frame, while local compensation in brightness changes have not been successfully addressed.

A specific method to address brightness differences was developed for compensation of brightness differences between a pair of frames (a current frame and a past decoded reference frame by one example which may or may not be an immediately previous frame to the current frame). These methods adaptively estimate and apply separate brightness change parameters for different parts of the frame, while remaining efficient in bit cost and low in complexity.

Referring to FIG. 22, by one approach, an example process 2200 is arranged in accordance with at least some implementations of the present disclosure. Process 2200 may include one or more operations, functions or actions as illustrated by one or more operations. Process 2200 may form at least part of a next generation video coding process. By way of non-limiting example, process 2200 may form at least part of a next generation video encoding process as undertaken by coder system 100 and 200 of FIGS. 1-2 or gain compensation coder systems 3200 and 3300 of FIGS. 32-33, and/or any other coder system or subsystems described herein.

Process 2200 may be a computer implemented method of video coding for “performing compensation of inter-frame changes in brightness” 2202. This may begin with “calculating multiple sets of parameters where each set comprises a gain value and an offset value for a portion of a frame, and calculated by using brightness of pixels of a current frame and a reference frame”. By one example, the claim portions may be partitions forming a frame.

Thereafter, the process 2200 may comprise “transmitting the sets of parameters and an indication of which portion of the frame corresponds to which parameters to a decoder”. With this arrangement, the best parameters for a frame that balance quality with bit load per frame may be selected and then transmitted to the decoder so that this determination may be omitted on the decoder side.

The process 2200 may also comprise “using the parameters to form a modified reference frame that is lower in error than the original reference frame”. Specifically, a modified reference frame that is modified by gain compensation may be used as a reference frame for a P-picture or an F-picture, for example, where an F-picture as described above, is bi-directional such that it may use past, future, or both types of references frames while it may use modified reference frames that are morphed or synthesized, and where gain compensation is merely one type of morphing that may be performed.

Referring to FIG. 23, by a slightly more specific example approach, an example process 2300 is arranged in accordance with at least some implementations of the present disclosure. Process 2300 may include one or more operations, functions or actions as illustrated by one or more operations. Process 2300 may form at least part of a next generation video coding process. By way of non-limiting example, process 2300 may form at least part of a next generation video encoding process as undertaken by coder system 100 and 200 of FIGS. 1-2, or gain compensation coder systems 3200 and 3300 of FIGS. 32-33, and/or any other encoder system or subsystems described herein.

The process 2300 may be a computer-implemented method for video coding that comprises “obtaining frames of pixel data and having a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame” 2302.

The process 2300 also may include “selecting a partition pattern wherein each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame” 2304. Thus, by one approach, there may be a set of predetermined partition patterns for a frame, and the system may calculate parameters for each alternative pattern, and then choose the best pattern as explained below.

The process 2300 also may include “determining brightness gain compensation values for the reference frame by providing a gain value and an offset value for individual partitions” 2306. Thus, in one form, a gain and offset value are determined for each partition, or at least multiple partitions, and these values may be used to determine which partition pattern provides the best balance between image quality and bits to be transmitted.

The process 2300 also may include “applying locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame” 2308. This provides local gain compensation for different parts of a frame that have different changes in brightness rather than a global brightness change that is less accurate.

Referring to FIG. 24, now in more detail, an example process 2400 is arranged in accordance with at least some implementations of the present disclosure. Process 2400 may include one or more operations, functions or actions as illustrated by one or more operations. Process 2400 may form at least part of a next generation video coding process. By way of non-limiting example, process 2400 may form at least part of a next generation video encoding process as undertaken by coder system 100 or 200 of FIGS. 1-2 or gain compensation coder systems 3200 or 3300 of FIGS. 32-33, and/or any other encoder system or subsystems described herein.

Process 2400 may include first obtaining frames of pixel data and having a current frame and a decoded reference frame 2402. As described with encoder 100, a video stream may be provided to an encoder that has a decoding loop 135 in order to find residuals and provide the quantized residuals to a decoder. Thus, frames may be decoded, and used as decoded reference frames to predict yet other frames. A morphing unit such as unit 120 may be used to determine which frames are to be modified or morphed by gain compensation.

Process 2400 may also include determine block averages 2402, which includes determining average pixel-based values for, by one example, a uniformly sized block that can be used to form the values for partitions. Specifically, for every 4×4 pixel block in a frame (although other sizes may be chosen) in both the current frame and the reference frame, the following are calculated: (1) average of the pixel values, (2) the average of the square of the pixel values, and in one calculation method, (3) the average of the product of the pixel value in the current frame and reference frame. Other values may be calculated depending on which of these values will be needed to calculate the gain a and offset b for a partition and in the equations provided below. The point is to select block averages that will save computing time and load so that the gain and offset equations do not need to be calculated for every individual pixel to provide a single value for a partition. Pre-defined partition patterns may be stored in a memory and may be sized to fit the 4×4 blocks evenly. Otherwise, the partitions may be assumed to be, or rounded, to the closest size that will fit the 4×4 blocks.

Referring to FIGS. 25-26, once the block averages are provided, the process 2400 may include determine partition averages 2406. This operation may first include determining which blocks belong to which partition for each of the partition patterns. As shown on FIG. 25, many potential partitionings or partition patterns of a video frame for the purpose of local brightness change (gain ‘a’, and offset ‘b’) estimation and compensation are provided. FIG. 26 provides a codebook 2600 of 128 entries in which the first 62 entries are defined by a number of horizontal partitions of the video frame and a number of vertical partitions of the video frame, such that each partition pattern index number is associated with a particular number of partitions, and specific partition arrangement when the arrangement is not symmetrical. For instance, partition pattern 10 refers to partitioning of a picture horizontally into two partitions, and vertically into three partitions (2×3), while partition pattern 11 has a (3×2) arrangement instead, and as shown on FIG. 25. If each partition cannot be equal in size, an attempt is made to keep partition sizes as uniform as possible, with adjustments made in the last partition horizontally and vertically. For the purpose of calculations, internal partition sizes are kept as multiples of four pixel precision as mentioned above. Further, the codebook entries from 62 to 127 shown on FIG. 26 allow a different way of partitioning a picture, again with four pixel precision, by using actual partition size (rather than number of partitions). For instance, partition number 79 has a partitioning size of 64 pixels (horizontally)×24 pixels (vertically). The table or codebook 2600 shows all 128 potential partitionings provided.

Referring to FIGS. 27-28, and continuing with determine partition averages 2406, the offsets and gains are calculated for multiple, and in one case all, partition patterns to determine which pattern is the best one to use. The available partition patterns may optionally be limited to a select number of certain patterns depending on a variety of characteristics, such as type of picture (P picture or F picture), complexity of the frame or contents of the image on the frame, bit rate limitations, and so forth. Two example methods for calculating gain and offset values are explained herein where one is a moment based method, and the other is based on mean square error (MSE). For the first method, logic 2700 used to explain the algorithm for moment method I uses averagers 2702 and 2704 to obtain the average pixel value (or level) and average square of pixel values (or level) of the blocks for a current frame. The same calculation is performed by averagers 2706 and 2708 for the reference frame. The average values of the blocks that fit in, or are otherwise associated with, a certain partition being analyzed are then added up and then averaged to obtain an average value for a partition. This is repeated for each partition on each available partition pattern.

Likewise, the second method has logic 2800 that respectively uses averagers 2802 and 2804 to determine the average product of current and reference frame brightness pixel values and average pixel value or level for each partition for a current frame, and respectively uses averagers 2806 and 2808 to determine the average square of pixels and average pixel value or level for each partition for the reference frame.

Process 2400 then may include calculate gain a and offset b values 2408 by using the partition average values just explained, for example. In one form, one pair of values (or parameters), for example gain a and offset b, are calculated for each partition in the potential partition patterns. The following equation relates brightness of a pixel s_(t)(i,j) at (i,j) location in frame ‘t’ to brightness of a pixel at the same location (i,j) in a previous frame (reference frame) ‘t−1’, with ‘a’ and ‘b’ being the gain and offset factors, respectively. Motion is assumed to be small and only the brightness changes are modeled.

s _(t)(i,j)=a×s _(t-1)(i,j)+b  (18)

As mentioned, two methods for compensation of brightness changes between a pair of frames in a video scene are used as follows.

Method 1: Moments Based Technique

By this method, taking the expected value E of s_(t)(i,j) and (s_(t) ²(i,j)), and following a method of equating first and second moments of a current frame ‘t’, and a previous frame ‘t−1’ can be computed as follows:

$\begin{matrix} {\mspace{79mu} {{{s_{t}\left( {i,j} \right)} = {{a \times {s_{t - 1}\left( {i,j} \right)}} + b}}\mspace{79mu} \left( {{starting}\mspace{14mu} {with}\mspace{14mu} {repeat}\mspace{14mu} {of}\mspace{14mu} {equation}\mspace{14mu} (18)} \right)}} & (19) \\ {\mspace{79mu} {{E\left( {s_{t}\left( {i,j} \right)} \right)} = {{a \times {E\left( {s_{t - 1}\left( {i,j} \right)} \right)}} + b}}} & (20) \\ {\mspace{79mu} {\left( {s_{t}^{2}\left( {i,j} \right)} \right) = {\left( {{a \times {s_{t - 1}\left( {i,j} \right)}} + b} \right)^{2} = {a^{2} \times {s_{t - 1}\left( {i,j} \right)}}}}} & (21) \\ {\mspace{79mu} {{E\left( {s_{t}^{2}\left( {i,j} \right)} \right)} = {E\left( \left( {{a \times {s_{t - 1}\left( {i,j} \right)}} + b} \right)^{2} \right)}}} & (22) \\ {\mspace{79mu} {b = {{E\left( {s_{t}\left( {i,j} \right)} \right)} - {a \times {E\left( {s_{t -_{1}}\left( {i,j} \right)} \right)}}}}} & (24) \\ {{E\left( {s_{t}^{2}\left( {i,j} \right)} \right)} = {{a^{2}{E\left( {s_{t - 1}^{2}\left( {i,j} \right)} \right)}} + \left( {E\left( {\underset{t}{s}\left( {i,j} \right)} \right)} \right)^{2} + {a^{2}\left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)}^{2} - {2 \times a^{2} \times \left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)^{2}}}} & (25) \\ {\mspace{76mu} {{E\left( {s_{t}^{2}\left( {i,j} \right)} \right)} = {{a^{2}{E\left( {s_{t - 1}^{2}\left( {i,j} \right)} \right)}} + \left( {E\left( {s\left( {i,j} \right)} \right)} \right)^{2} - {a^{2}\left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)}^{2}}}} & (26) \\ {\mspace{79mu} {{{a^{2}{E\left( {s_{t - 1}^{2}\left( {i,j} \right)} \right)}} - {a^{2}\left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)}^{2}} = {{E\left( {s_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {s_{t}\left( {i,j} \right)} \right)} \right)^{2}}}} & (27) \\ {a^{2} = {\left( {{E\left( {s_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {s_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right)/\left( {{E\left( {s_{t - 1}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)^{2}} \right)}} & (28) \\ {\mspace{79mu} {a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}}} & (29) \\ {\mspace{79mu} {b = {{E\left( {s_{t}\left( {i,j} \right)} \right)} - {a \times {E\left( {s_{t - k}\left( {i,j} \right)} \right)}}}}} & (30) \end{matrix}$

where t−k replaces t−1 for the general form of the equation such that the reference frame is not necessarily the adjacent previous frame to the current frame being predicted. Frame t−k may be an assigned reference frame, such as a key frame, or other frame relevant to motion compensation for the current frame.

Method 2: MSE Gradient Minimization Based Technique

By this method, the gain a and offset b parameters between frame ‘t’, and ‘t−1’ can be computed as follows.

e=s _(t)(i,j)−(a×s _(t-1)(i,j)+b)  (31)

e ²=(s _(t)(i,j)−(a×s _(t-1)(i,j)+b))²  (32)

E(e ²)=E(s _(t)(i,j)−(a×s _(t-1)(i,j)+b))²  (33)

E(e ²)=(E(s _(t)(i,j))² +E(a×s _(t-1)(i,j)+b)²−2×E(s _(t)(i,j))×E(a×s _(t-1)(i,j)+b)   (34)

E(e ²)=(E(s _(t)(i,j))² +a ²(E(s _(t-1) ²(i,j)))+b ²+2ab E(s _(t-1)(i,j))−2×E(s _(t)(i,j))×E(a×s _(t-1)(i,j)+b)  (35)

E(e ²)=(E(s _(t)(i,j))² +a ²(E(s _(t-1) ²(i,j)))+b ²+2ab E(s _(t-1)(i,j))−2a×E(s _(t)(i,j))×E(s _(t-1)(i,j)−2b×E(s _(t)(i,j)  (36)

where e is the error and the other variables are already described above. The mean square error (MSE) gradient with regard to ‘a’ is:

$\begin{matrix} {\frac{\partial E}{\partial a} = {{2{a\left( {E\left( {s_{t - 1}^{2}\left( {i,j} \right)} \right)} \right)}} + {2{b\left( {{E\left( {s_{t - 1}\left( {i,j} \right)} \right)} - {2{E\left( {s_{t}\left( {i,j} \right)} \right)} \times {E\left( {s_{t - 1}\left( {i,j} \right)} \right.}}} \right.}}}} & (37) \end{matrix}$

To minimize gradient with regard to ‘a’, set

${\frac{\partial E}{\partial a} = 0},$

and

α(E(s _(t-1) ²(i,j)))+b(E(s _(t-1)(i,j))=E(s _(t)(i,j))×E(s _(t-1)(i,j)  (38)

Mean square error (MSE) gradient with regard to ‘b’ is:

$\begin{matrix} {\frac{\partial E}{\partial b} = {{2b} + {2{a\left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)}} + {2{b\left( {E\left( {s_{t - 1}\left( {i,j} \right)} \right)} \right)}} - {2{E\left( {s_{t}\left( {i,j} \right)} \right)}}}} & (39) \end{matrix}$

To minimize gradient with regard to ‘b’, set

${\frac{\partial E}{\partial b} = 0},$

and

α(E(s _(t-1)(i,j)))+b(1+E(s _(t-1)(i,j)))=E(s _(t)(i,j))  (40)

Solving the two linear equations for ‘a’ and ‘b’, results in:

$\begin{matrix} {a = \frac{{E\left( {{s_{t}\left( {i,j} \right)}{s_{t - k}\left( {i,j} \right)}} \right)} - {{E\left( {s_{t}\left( {i,j} \right)} \right)}{E\left( {s_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {s_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {s_{t}\left( {i,j} \right)} \right)}{E\left( {s_{t - k}\left( {i,j} \right)} \right)}}}} & (41) \\ {b = {{E\left( {s_{t}\left( {i,j} \right)} \right)} - {a \times {E\left( {s_{t - k}\left( {i,j} \right)} \right)}}}} & (42) \end{matrix}$

where t−k replaces t−1 for the general form of the equation such that the reference frame is not necessarily the adjacent previous frame to the current frame being predicted as mentioned above.

Referring again to FIGS. 27-28, the logic 2700 and 2800 is provided to explain the equations (29) and (30) for calculating gain a and offset b for a partition using the average partition values explained above and the moment based method one, and equations (41) and (42) for calculating gain a and offset b for a partition using MSE method two. For the moment method, the average pixel value for a partition at the current frame (t) and from the averager 2704 is squared at a multiplier 2710, and then subtracted at a subtractor 2712 from the average square of the pixels from the averager 2702 and for the same partition of the current frame. Likewise, the average pixel value for a corresponding partition of a reference frame (t−k) and from the averager 2708 is squared at a multiplier 2714, and then subtracted at a subtractor 2716 from the average square of the pixels from the averager 2706 and for the corresponding partition of the reference frame.

The result of the subtractor 2712 is divided by the result of the subtractor 2716 at divider 2718, and the square root of the result is taken at component 2720 which results in gain a for the partition being analyzed. Gain a is multiplied by the average pixel level of the reference frame at a multiplier 2722, and the product is then subtracted at subtractor 2724 from the average pixel value of the partition of the current frame from the averager 2704. This results in the offset b for the partition being analyzed. This process is repeated for multiple or each partition in each of the potential alternative patterns that are available for the current frame in question. Once completed, the result may be parameters (gain a and offset b) for each partition of each available partition pattern together forming a set of parameters.

For the MSE method, the average pixel value for a partition at the current frame (t) and from averager 2804 is multiplied by the average pixel value for a corresponding partition at the reference frame (t−k) and from the averager 2808. This product is then subtracted from both the average product (of the corresponding current and reference brightness pixel values) from averager 2802 and at subtractor 2812, and the average square pixel value from averager 2806 and at subtractor 2814. The result of the subtractor 2812 is divided by the result of the subtractor 2814 at divider 2816, and the result is gain a for the partition being analyzed. Gain a is provided to multiplier 2818 to be multiplied by the average pixel value of the partition of the reference frame from averager 2808. The product is then subtracted from the average pixel value of the partition of the current frame from averager 2804 to form the offset b for the partition being analyzed.

Once gain a and offset b for the partitions of the available patterns are calculated, the process 2400 then determines and selects the best partition pattern 2410. This may include calculate distortion D between reference and current frame 2412.

Referring to FIGS. 29A-29B, an example efficiency table 2900 is provided and an efficiency value in the form of a sum of absolute difference (SAD) value for method I and an MSE based SAD value for method II is provided for comparison. Specifically, table 29 shows a column for pattern number for the first 62 partition patterns (patterns 63-127 are not shown), a column for pattern arrangement and size in horizontal vs. vertical size. A column is also provided to show the efficiency values for method 1 as SAD values that provide the difference (or distortion or change) between brightness pixel values of a reference frame adjusted by the gain compensation parameters using method I and the brightness values of the corresponding pixels of the current (also called the original) frame. Another column is provided for the efficiency value using MSE based SAD values of the second method II. The MSE may provide the luma or brightness change between the modified reference frame and the current frame as an alternative to a SAD value. The frames used for these example calculations are the shuttle crew video sequence frames (FIGS. 10-11).

The smaller the SAD error value, the relatively higher the improvement on table 2900. It will be noted, however, that sometimes method I is better, and sometimes method II is better. The first value, 13.45, shows the resulting distortion when the reference frame is not modified. In the illustrated example, the best efficiency then is pattern 61 with the lowest value of 5.4311 for method I, and an even better value of 5.32906 of method II. These differences or distortions using method I, or in the form of MSE for method II, or both may be provided for each partition pattern available for a frame. This distortion D as used below to determine the best pattern may be the same SAD calculation here for method I or MSE for method II (rather than the MSE based SAD). However, the bit cost of sending the gain parameters is not included here. Basically, the higher the number of partitions, while SAD can be reduced, the bit cost also increases so that Rate Distortion Optimization (RDO) may be performed to yield the best tradeoff between SAD reduction and bit cost incurred by sending more partitions. Thus a bit cost or bitrate (as in bits per frame) is also factored into the RDO to determine the best partition

Thus, the process 2400 may also include calculate bitrate R for the frame 2414. The bit count for a frame may be fixed or adaptable, at least depending on the partition pattern used and fixed to a certain number of quantization bits. Specifically, for practical reasons of overhead, the full precision of computed ‘a’ and ‘b’ parameters of the selected best partition pattern cannot be kept for transmission to a decoder since it would be too high in bit count. Thus, these parameters may be adaptively reduced in accuracy such that the coding bitcost can be efficient without much impact on their effectiveness. This also allows for constraining of these parameters to a useful permissible range. This process of reduction of accuracy of parameters is called quantization so that a range of values of each of these parameters is represented by a chosen representative level.

In more detail, in the illustrated example, the quantization may limit each gain and offset value to a value of affixed number of bits, such as an 8-bit value in one example, and for each partition in a partition pattern, while the index number of the partition pattern also may be quantized to a value of a permissible number of bits, such as a 7-bit value by one example. The decoder, then, may already have an index of the partition patterns in memory rather than transmitting a more bit-heavy description of the partition pattern to the decoder. Thus, in order to select the best partition pattern, it is the bit count that is needed rather than the actual quantization values so that the best partition pattern can be performed before the actual quantization of the gain compensation parameters corresponding to the best partition pattern. For a single gain and offset parameter (or in other words, per partition), for instance, in case a single set of gain and offset parameters are sufficient for compensation of gain, the representation overhead for such parameters can be calculates as follows (this is the case where there are no partitions or one partition for the whole frame).

Total Gain parameter bit cost R=Bit cost of gain pattern+Bit cost of parameter ‘a’ quantized representation+Bit cost of parameter ‘b’ quantized representation.  (43)

Assuming all patterns are assigned the same code length of 7 bits (due to 128 patterns), and assuming each quantization level for ‘a’ parameter, and ‘b’ parameters are assigned the same bit-length of 8-bits for quantization, the total bit cost R can be calculated as follows.

Total bit cost for global brightness change compensation=7+8+8=23 bits.

Further, assuming a more advanced case where there are multiple partitions for a single frame, then the bit count or bitrate R is:

Total Gain parameter bit cost=Bit cost of gain pattern+(number of partitions in the pattern)×(Bit cost of parameter ‘a’ quantized representation+Bit cost of parameter ‘b’ quantized representation)  (44)

Thus, by one example, the bitrate R for frames involving use of pattern number 11, that uses six partitions, the overall bit cost of performing brightness change compensation by using this pattern is given as follows. The total bit cost for local brightness change compensation using pattern number eleven:

R=7+6×(8+8)=103 bits  (45)

Since the codebook of table 2600 also contains patterns with even more partitions than six, the bit cost of selecting these patterns can be even higher, say as high as over 500 bits. Further, while other methods such as reduction of gain and offset bit cost by encoding differences between these parameters of neighboring partitions is possible, for simplicity it is assumed that each set of parameters for each partition are coded independently. So, RDO is used to determine, how many bits to spend on brightness change compensation (or essentially, determine the best partition pattern 2416 or which pattern to select from the choice of 128 patterns). The optimum or best pattern is given by Rate Distortion Optimization (RDO) equation as follows.

One needs to compute a minimum {J}, such that,

J=D+λ×R  (46)

where D is the distortion (the SAD as described above with table 2900), R is the bitrate associated with the parameters as in equation (44), and λ is a langrangian multiplier. If a unit of distortion D is SAD, and Q is the quantizer used for transform coefficients (used for quantizing the image data and other residuals for the frames in the system), and c is a constant, then:

$\begin{matrix} {\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}} & (47) \end{matrix}$

For NGV codec, a suitable value of ‘c’ is found by heuristics to be between 0.65 and 0.75 so a middle value of 0.7 is used, resulting in value of λ as follows.

λ=0.8367×(Q/2)  (48)

Thus, the partition pattern that provides the minimum {J} is considered the best partition pattern that provides the best balance between image quality (the most accurate brightness values for example or the lowest distortion between the modified reference frame and the current frame) and the bit-cost for choosing that pattern. This limits the possibility that a pattern could be chosen that provides a relatively insignificant increase in brightness accuracy with a high bit cost.

Alternatively, it also will be appreciated that the distortion D and bitrate R may be calculated to factor in other characteristics. For example, the distortion D may be performed after the gain and offset values have quantized and then dequantized to less accurate values, and then the SAD and MSE distortion is calculated rather than using the non-quantized gain and offset values. Also, the distortion D may be calculated after motion compensation is performed on the current frame, As to alternatives for the bitrate R, R may be calculated by coming up with a bit count after quantization to confirm the bit count, especially when permissible bit counts are variable rather than fixed at 8-bits for the gain and offset for example. Otherwise, the quantized values may be entropy encoded to represent the actual bits sent for R in the RDO equation. Other alternatives are contemplated.

Referring to FIGS. 30A-30B, the process 2400 then may proceed with quantize the selected partition pattern (or indicator) and gain/offset values to predetermined bit size 2418. As mentioned above, this means, by one example, the partition pattern index number is quantized to the seven bit value, while the gain and offset values are quantized to the eight bit values. It will be appreciated that many other bit count limits (other than seven or eight) may be used as desired. It also will be understood that this is a lossy compression, and is performed as follows.

A table 3000, titled Quantization of Luma Gain parameter ‘a’ to 8 bits, shows the quantization of the gain ‘a’ parameter. This includes a process of dividing the useful range of ‘a’ parameter into 40 intervals (numbered 0 to 39), and depending on the significance of an interval, an interval can be divided into one or more sub-intervals. For instance interval range 0.90 to 1.00 (interval 19 on table 3000), due to its high significance, is divided into 40 subintervals, while interval range 0.45 to 0.50 (interval 14) is only divided into two intervals. Overall the permissible range for ‘a’ is defined to be between −0.45 to +2.45, and corresponds to 256 possible entries. The index of sub-interval column on table 3000 (showing index of sub-intervals numbers 0 to 255 shown in the second column from the right) does not show each index number, but it will be understood that for main intervals with sub-intervals, the first sub-interval index number is shown, and the other index numbers may be found by counting in numerical order from there. For example, if a gain value is closest to 0.62083 by one example (and by main interval index number 16 in the left column), then the sub-interval index number is 21+2=23. This allows for an 8 bit representation.

The right column shows the quantized gain value that is used for gain ‘a’. By one approach, the closest interval/subinterval is used. By other approaches, it is the next greater interval/sub-interval value that is used, or the next lower value. Other possibilities are contemplated. Once the interval/sub-interval is selected, the 8-bit binary representation of the index number of the interval or sub-interval (0 to 255) is used to transmit to a decoder, which has the interval index to indicate which interval or sub-interval representation value to use for gain compensation.

Referring to FIGS. 31A-B, a table 3100 is provided for quantization of the offset b parameter, and by one form limiting the offset to a certain number of bits, such as 8 bits for a sub-interval index number, just as the gain value is reduced to the sub-interval index number. Thus, similar to table 3000, table 3100 also shows the process of dividing the useful range of offset ‘b’ parameter into 40 intervals such that depending on the significance of an interval, an interval can be divided into one or more subintervals 0 to 255. For instance interval range −10 to −1 (main interval 18 in the left column) is divided into 36 subintervals starting with sub-interval index number 88, while interval range −40 to −30 (main interval number 15) is only divided into 12 sub-intervals and starts with sub-interval index number 21. Overall, the permissible range for ‘b’ for the illustrated example may be defined to be between −155 to +155, and corresponds to 256 entries, allowing for an 8 bit representation.

Once quantized, the process 2400 may transmit the gain compensation values including the best pattern (whether the identification of the pattern by index number or other description) and the parameters including the gain and offset values for each partition in the selected pattern 2420. Otherwise, the best pattern and parameters are inverse quantized 2422 for use to form a modified reference frame that is lower in error than the original reference frame (at least in pixel brightness values) 2424. The process 2400 then may perform motion compensation using the modified reference frame for the current frame 2426.

Referring to FIG. 32, an example video encoder 3200 performs gain and offset computations using the pattern codebook 2600, use of RDO to compute the best pattern, encoding of gain and offset parameters, and provides interfaces for gain estimation and compensation components of a basic video encoder that uses these parameters, encodes them, and sends them to a decoder.

The current (or original) frame of a video sequence for which motion compensation is needed, is also used to modify a reference frame modified or morphed by gain compensation and specifically to estimate gain and offset parameters to adjust the reference frame (where the reference frame may be a past or adjacent previous decoded frame relative to the current frame by one example). The current frame may be input to both a prediction partitions generator 3202, similar to generator 105 of FIG. 1, and a processing unit referred to as Video Frame Gain Partitioner 3216, and that receives at another input, a pattern for partitioning from a codebook of patterns 3220, in response to an address generated by a Pattern Index Generator Loop 3218. By one example, the Pattern Index Generator Loop 3218 creates, one at a time, an address for each pattern in the codebook. Alternatively, when it is desirable to reduce complexity, a select range of patterns, less than all patterns, are made available for a frame. The reference frame also may be input to the Video Frame Gain Partitioner 3216. In any case, the Video Frame Gain Partitioner 3216 uses the pattern information to partition the current frame as well as the reference frame, and inputs these gain partitions to the Partitions Gain & Offset Params Computer 3222 that computes a gain and offset value per partition of each available pattern or all patterns.

Next, by one example, the computed gain and offset values are quantized by a quantizer 3224 to reduce their accuracy, while the non-quantized gain and offset values are used by a Gain Compensation Prediction Diff Computer 3228 to compute gain compensated prediction difference or distortion D for the reference frame and current frame partitioned as per the patterns from the codebook 2600. For each of the potential patterns, both the coding bit cost R of gain and offset parameters, as well as corresponding distortion D (typically SAD, although MSE can also be used) may be provided to a Rate Distortion Analyzer and Best Choice Selector 3230. As mentioned above, the bit count may be calculated based on the pattern being analyzed, provided by quantizer 3224, or even provided, as shown, from entropy encoder 3226. The best choice of pattern then may be selected based on minimization of the J function in Rate Distortion Optimization (RDO) analysis, described earlier. The best pattern choice, and the corresponding gain and offset parameters per partition are entropy encoded by entropy encoder 3226 and sent via the bitstream at bitstream generator 2110 to the decoder.

At the encoder, using the selected pattern, the gain and offset parameters, and the decoded reference frame, a gain compensated prediction frame is generated. This is performed by inverse quantizing the partitions and gain and offset parameters at an inverse quantizer 3232, and providing the dequantized values to a gain compensation unit and local buffer 3238. Meanwhile, an inverse transform and inverse quantizer 3212 performs inverse operations on already quantized image and inter or intra-coding data and provides the data to a decoding loop with a partitions assembler, deblock filter, and so forth 3224 already detailed in encoder 100. These decoded frames are then used as the previous or past decoded reference frame provided to video frame gain partitioner 3216 and to a decoded picture buffer 3236. The decoded frames are then provided to the gain compensation unit and local buffer 3238, which is similar to the morphing analyzer 120. The gain compensation unit 3238 forms the modified reference frame with the dequantized gain compensation parameters by adjusting the brightness or luma values of the reference frame with the gain and offset values according to equation (18) by one example. With the modified reference frames, a motion estimation and motion compensated predictor 3240 performs motion estimation and compensation to generate a motion compensated prediction error (difference) signal that is added to current frames at adder 3204, transformed (e.g. by DCT) at forward transform and quantized at forward transform and quantization component 3206, and entropy coded at encoder 3208. The motion vectors also are provided to an entropy decoder 3242 before the motion vectors and difference signal is placed in the bitstream 3210. The encoded bitstream thus carries not only entropy coded gain pattern and gain parameters, but also entropy coded motion vectors, entropy coded transform coefficients, as well as entropy coded prediction and coding partitioning information (not shown).

Referring to FIG. 33, a gain and offset decoder 3300 with interfaces of gain and offset compensation use gain parameters sent via the bitstream. Specifically, at the decoder 3300, a bitstream with the identification of the selected partition pattern and gain and offset values (the parameters) are received at a bitstream parser 3302. The operation of Gain and Offset compensation within the video decoder is simpler relative to the encoder. Here, once the bitstream is parsed, an entropy decoder 3304 decodes the partition pattern and the gain and offset parameters of the pattern. An entropy decoder 3306 decodes motion vectors, while an entropy decoder 3308 decodes transform coefficients as well as prediction and coding partitions information (not shown). An Inverse Quantizer 3310 provides the partition pattern index number as well as the gain and offset values (or at least the sub-interval value). A Gain Compensation Unit and Local Buffer 3312 obtains the pattern and gain parameters as well as the decoded reference frame from the decoded picture buffer 3314, and obtains the pattern map from a codebook 3316. By applying the decoded gain and offset pattern and parameters on the decoded reference frame to adjust the brightness pixel values of the reference frame, a gain compensated reference frame is generated. In order to calculate the revised pixel values on the reference frame, the decoded dequantized values of gain ‘a’ and offset ‘b’ are put back into equation (18) by one example, and using decoded values of pixels in the previous or other reference frame, a gain compensated modified version of a reference frame is calculated that is lower in error than the original reference frame, and is then used for generating (gain compensated) motion compensated prediction.

Specifically, the modified reference frame is then provided to a motion compensated prediction component 3318 in which motion vectors index the right blocks for prediction, to which decoded prediction error blocks are added by an adder 3322 and from an inverse quantizer and inverse transform unit 3320, generating reconstructed blocks or video. Thus, the corresponding predictions from modified reference frames are added to the (inverse transformed, and dequantized) decoded prediction error blocks to generate the final decoded reconstructed frame (or blocks of the frame). The reconstructed blocks are provided to a partitions assembler and deblock filter 3324 and so forth forming the decoding loop similar to that described for decoder 200. The same or similar decoding loop is encapsulated in the encoder as well so that the process at encoder and decoder stays synchronized.

For local motion compensation, instead of a single set of (a, b) parameters for an entire frame, this coder or coding system provides multiple sets of parameters computed and transmitted along with the map (or index number) of which portion of the frame corresponds to which parameters, and to the decoder and used for gain compensation as described.

Referring to FIG. 34, an example video coding system 3500 and video coding process 3400 in operation, are arranged in accordance with at least some implementations of the present disclosure. In the illustrated implementation, process 3400 may include one or more operations, functions or actions as illustrated by one or more of actions 3401 to 3411. By way of non-limiting example, process 3400 will be described herein with reference to example video coding system 3500 including encoder 100 of FIG. 1 and decoder 200 of FIG. 2, as is discussed further herein below with respect to FIG. 35. In various examples, process 3400 may be undertaken by a system including both an encoder and decoder or by separate systems with one system employing an encoder (and optionally a decoder) and another system employing a decoder (and optionally an encoder). It is also noted, as discussed above, that an encoder may include a local decode loop employing a local decoder as a part of the encoder system.

In the illustrated implementation, video coding system 3500 may include a processing unit such as a graphics processing unit 3520 with logic circuitry 3550, the like, and/or combinations thereof. For example, logic circuitry 3550 may include encoder system 100 of FIG. 1, or alternatively 3200 of FIG. 32 and/or decoder system 200 of FIG. 2 or alternatively 3300 of FIG. 33, and may include any modules as discussed with respect to any of the encoder systems or subsystems described herein and/or decoder systems or subsystems described herein. Although video coding system 3500, as shown in FIG. 34 may include one particular set of blocks or actions associated with particular modules, these blocks or actions may be associated with different modules than the particular modules illustrated here. Although process 3500, as illustrated, is directed to encoding and decoding, the concepts and/or operations described may be applied to encoding and/or decoding separately, and, more generally, to video coding.

Process 3400 may begin with “receive input video frames of a video sequence” 3401, where input video frames of a video sequence may be received via encoder 100 for example. This may include a current frame and a past or previous frame (that is to be used as a reference frame), and that is to be used for motion compensation to reconstruct a predicted frame as the current frame.

The process 3400 also comprises “perform prediction and coding partitioning, quantization, and decoding loop to decode a reference frame” 3402. The reference frame may be modified by morphing or synthesis as explained above, where one of the morphing options is to perform gain compensation on the reference frame so that the brightness values are more correct before using the reference frame for motion compensation for the current frame.

The process 3400 also comprises “calculate brightness gain a and offset b for gain partitions of potential gain partition patterns using the current and reference frames” 3403. This may be performed, as explained above, by determining the available partition patterns, and then calculating a gain value and offset value for each partition in each potential pattern. The gain and offset may be calculated by using equations (29) and (30) for a moment method, or equations (41) and (42) for an MSE method.

The process 3400 also comprises “determine best partition to balance bit load and quality” 3404. This may be performed by one example, using RDO and determining distortion D and bitrate R for a minimum {J} function of equation (46).

The process 3400 also comprises “dequantize the pattern number, gain, and offset values to adjust the brightness values of the reference frame” 3405. Thus, in order to perform motion compensation that can be duplicated at the decoder, the motion compensation at the encoder to form motion vectors and residuals should be based on the same gain and offset values that will be formed by the decoder. Thus, this operation includes quantizing the gain parameters and partition pattern indicator, and in one form to predetermined or fixed bit sizes as formed for bitrate R. The dequantized values are then used to modify the brightness values of the reference frame.

The process 3400 also comprises “perform motion compensation on the current frame by using the adjusted reference frame” 3406. This will form the residuals and motion vectors to be sent to the decoder so that the current frame can be reconstructed.

The process 3400 also comprises “transmit motion data and gain compensation parameters to decoder” 3407. The motion data may include residuals and motion vectors, and the gain compensation parameters may include the indicator of the selected partition pattern, and the gain and offset values for each, or multiple, of the partitions in the pattern.

The process 3400 also comprises “receive and decode bitstream” 3408. This may include parsing the bitstream into gain data, motion or other residual data, and image or frame data, and then entropy decoding the data.

The process 3400 also comprises “perform inverse decoding operations to obtain gain compensation parameters: gain a, offset b, and partition pattern as well as frame data and motion data” 3409. This will finally reconstruct that values for each type of data.

The process 3400 also comprises “adjust brightness values of the reference frame using the gain compensation parameters” 3410. Thus, the gain and offset values are plugged into equation (18) again to change the brightness values of the reference frame and form a modified reference frame.

The process 3400 also comprises “perform motion compensation on the current frame and using the modified reference frame to form a frame for display” 3411. This forms the residuals that may be added to inverse quantized prediction blocks to form finally reconstructed blocks or frames.

Various components of the systems described herein may be implemented in software, firmware, and/or hardware and/or any combination thereof. For example, various components of system 300 may be provided, at least in part, by hardware of a computing System-on-a-Chip (SoC) such as may be found in a computing system such as, for example, a smart phone. Those skilled in the art may recognize that systems described herein may include additional components that have not been depicted in the corresponding figures. For example, the systems discussed herein may include additional components such as bit stream multiplexer or de-multiplexer modules and the like that have not been depicted in the interest of clarity.

While implementation of the example processes herein may include the undertaking of all operations shown in the order illustrated, the present disclosure is not limited in this regard and, in various examples, implementation of the example processes herein may include the undertaking of only a subset of the operations shown and/or in a different order than illustrated.

Some additional and/or alternative details related to process 2200, 2300, and 2400, and other processes discussed herein may be illustrated in one or more examples of implementations discussed herein and, in particular, with respect to FIG. 35 below.

FIG. 35 is an illustrative diagram of example video coding system 3500, arranged in accordance with at least some implementations of the present disclosure. In the illustrated implementation, video coding system 3500 may include imaging device(s) 3501, video encoder 100, video decoder 200 (and/or a video coder implemented via logic circuitry 3550 of processing unit(s) 3520), an antenna 3502, one or more processor(s) 3503, one or more memory store(s) 3504, and/or a display device 3505.

As illustrated, imaging device(s) 3501, antenna 3502, processing unit(s) 3520, logic circuitry 3550, video encoder 100, video decoder 200, processor(s) 3503, memory store(s) 3504, and/or display device 3505 may be capable of communication with one another. As discussed, although illustrated with both video encoder 100 and video decoder 200, video coding system 3500 may include only video encoder 100 or only video decoder 200 in various examples.

As shown, in some examples, video coding system 3500 may include antenna 3502. Antenna 3502 may be configured to transmit or receive an encoded bitstream of video data, for example. Further, in some examples, video coding system 3500 may include display device 3505. Display device 3505 may be configured to present video data. As shown, in some examples, logic circuitry 3550 may be implemented via processing unit(s) 3520. Processing unit(s) 3520 may include application-specific integrated circuit (ASIC) logic, graphics processor(s), general purpose processor(s), or the like. Video coding system 3500 also may include optional processor(s) 3503, which may similarly include application-specific integrated circuit (ASIC) logic, graphics processor(s), general purpose processor(s), or the like. In some examples, logic circuitry 3550 may be implemented via hardware, video coding dedicated hardware, or the like, and processor(s) 3503 may implemented general purpose software, operating systems, or the like. In addition, memory store(s) 3504 may be any type of memory such as volatile memory (e.g., Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.), and so forth. In a non-limiting example, memory store(s) 3504 may be implemented by cache memory. In some examples, logic circuitry 3550 may access memory store(s) 3504 (for implementation of an image buffer for example). In other examples, logic circuitry 3550 and/or processing unit(s) 3520 may include memory stores (e.g., cache or the like) for the implementation of an image buffer or the like.

In some examples, video encoder 100 implemented via logic circuitry may include an image buffer (e.g., via either processing unit(s) 3520 or memory store(s) 3504)) and a graphics processing unit (e.g., via processing unit(s) 3520). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video encoder 100 as implemented via logic circuitry 3550 to embody the various modules as discussed with respect to FIG. 1 and/or any other encoder system or subsystem described herein. For example, the graphics processing unit may include coding partitions generator logic circuitry, adaptive transform logic circuitry, content pre-analyzer, encode controller logic circuitry, adaptive entropy encoder logic circuitry, and so on. The logic circuitry may be configured to perform the various operations as discussed herein.

In some implementations, the video encoder may include an image buffer and a graphics processing unit. The graphics processing unit may be configured to obtain frames of pixel data and have a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame. The unit may also select a partition pattern where each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame. The unit may determine brightness gain compensation values for the reference frame by providing a gain value and an offset value for individual partitions, and may apply locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.

In some examples, the graphics processing unit may be further configured to perform compensation of inter-frame changes in brightness comprising calculating multiple sets of parameters where each set comprises a gain value and an offset value for a portion of a frame, and calculated by using brightness of pixels of a current frame and a reference frame. The graphics processing unit also may perform transmitting the sets of parameters and an indication of which portion of the frame corresponds to which parameters to a decoder. The graphics processing unit may also perform using the parameters to form a modified reference frame that is lower in error than the original reference frame. The graphics processing unit may be further configured to transmit the bitstream.

Video decoder 200 may be implemented in a similar manner as implemented via logic circuitry 3550 to embody the various modules as discussed with respect to decoder 200 of FIG. 2 and/or any other decoder system or subsystem described herein.

In some examples, antenna 3502 of video coding system 3500 may be configured to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data associated with the coding partition (e.g., transform coefficients or quantized transform coefficients, optional indicators (as discussed), and/or data defining the coding partition (e.g., data associated with defining bi-tree partitions or k-d tree partitions using a symbol-run coding or codebook technique or the like)). Video coding system 3500 may also include video decoder 200 coupled to antenna 3502 and configured to decode the encoded bitstream.

In some embodiments, features described herein may be undertaken in response to instructions provided by one or more computer program products. Such program products may include signal bearing media providing instructions that, when executed by, for example, a processor, may provide the functionality described herein. The computer program products may be provided in any form of one or more machine-readable media. Thus, for example, a processor including one or more processor core(s) may undertake one or more features described herein in response to program code and/or instructions or instruction sets conveyed to the processor by one or more machine-readable media. In general, a machine-readable medium may convey software in the form of program code and/or instructions or instruction sets that may cause any of the devices and/or systems described herein to implement at least portions of the features described herein.

FIG. 36 is an illustrative diagram of an example system 3600, arranged in accordance with at least some implementations of the present disclosure. In various implementations, system 3600 may be a media system although system 3600 is not limited to this context.

For example, system 3600 may be incorporated into a personal computer (PC), laptop computer, ultra-laptop computer, tablet, touch pad, portable computer, handheld computer, palmtop computer, personal digital assistant (PDA), cellular telephone, combination cellular telephone/PDA, television, smart device (e.g., smart phone, smart tablet or smart television), mobile internet device (MID), messaging device, data communication device, cameras (e.g. point-and-shoot cameras, super-zoom cameras, digital single-lens reflex (DSLR) cameras), and so forth.

In various implementations, system 3600 includes a platform 3602 coupled to a display 3620. Platform 3602 may receive content from a content device such as content services device(s) 3630 or content delivery device(s) 3640 or other similar content sources. A navigation controller 3650 including one or more navigation features may be used to interact with, for example, platform 3602 and/or display 3620. Each of these components is described in greater detail below.

In various implementations, platform 3602 may include any combination of a chipset 3605, processor 3610, memory 3612, antenna 3613, storage 3614, graphics subsystem 3615, applications 3616 and/or radio 3618. Chipset 3605 may provide intercommunication among processor 3610, memory 3612, storage 3614, graphics subsystem 3615, applications 3616 and/or radio 3618. For example, chipset 3605 may include a storage adapter (not depicted) capable of providing intercommunication with storage 3614.

Processor 3610 may be implemented as a Complex Instruction Set Computer (CISC) or Reduced Instruction Set Computer (RISC) processors, x86 instruction set compatible processors, multi-core, or any other microprocessor or central processing unit (CPU). In various implementations, processor 3610 may be dual-core processor(s), dual-core mobile processor(s), and so forth.

Memory 3612 may be implemented as a volatile memory device such as, but not limited to, a Random Access Memory (RAM), Dynamic Random Access Memory (DRAM), or Static RAM (SRAM).

Storage 3614 may be implemented as a non-volatile storage device such as, but not limited to, a magnetic disk drive, optical disk drive, tape drive, an internal storage device, an attached storage device, flash memory, battery backed-up SDRAM (synchronous DRAM), and/or a network accessible storage device. In various implementations, storage 3614 may include technology to increase the storage performance enhanced protection for valuable digital media when multiple hard drives are included, for example.

Graphics subsystem 3615 may perform processing of images such as still or video for display. Graphics subsystem 3615 may be a graphics processing unit (GPU) or a visual processing unit (VPU), for example. An analog or digital interface may be used to communicatively couple graphics subsystem 3615 and display 3620. For example, the interface may be any of a High-Definition Multimedia Interface, DisplayPort, wireless HDMI, and/or wireless HD compliant techniques. Graphics subsystem 3615 may be integrated into processor 3610 or chipset 3605. In some implementations, graphics subsystem 3615 may be a stand-alone device communicatively coupled to chipset 3605.

The graphics and/or video processing techniques described herein may be implemented in various hardware architectures. For example, graphics and/or video functionality may be integrated within a chipset. Alternatively, a discrete graphics and/or video processor may be used. As still another implementation, the graphics and/or video functions may be provided by a general purpose processor, including a multi-core processor. In further embodiments, the functions may be implemented in a consumer electronics device.

Radio 3618 may include one or more radios capable of transmitting and receiving signals using various suitable wireless communications techniques. Such techniques may involve communications across one or more wireless networks. Example wireless networks include (but are not limited to) wireless local area networks (WLANs), wireless personal area networks (WPANs), wireless metropolitan area network (WMANs), cellular networks, and satellite networks. In communicating across such networks, radio 3618 may operate in accordance with one or more applicable standards in any version.

In various implementations, display 3620 may include any television type monitor or display. Display 3620 may include, for example, a computer display screen, touch screen display, video monitor, television-like device, and/or a television. Display 3620 may be digital and/or analog. In various implementations, display 3620 may be a holographic display. Also, display 3620 may be a transparent surface that may receive a visual projection. Such projections may convey various forms of information, images, and/or objects. For example, such projections may be a visual overlay for a mobile augmented reality (MAR) application. Under the control of one or more software applications 3616, platform 3602 may display user interface 3622 on display 3620.

In various implementations, content services device(s) 3630 may be hosted by any national, international and/or independent service and thus accessible to platform 3602 via the Internet, for example. Content services device(s) 3630 may be coupled to platform 3602 and/or to display 3620. Platform 3602 and/or content services device(s) 3630 may be coupled to a network 3660 to communicate (e.g., send and/or receive) media information to and from network 3660. Content delivery device(s) 3640 also may be coupled to platform 3602 and/or to display 3620.

In various implementations, content services device(s) 3630 may include a cable television box, personal computer, network, telephone, Internet enabled devices or appliance capable of delivering digital information and/or content, and any other similar device capable of unidirectionally or bidirectionally communicating content between content providers and platform 3602 and/display 3620, via network 3660 or directly. It will be appreciated that the content may be communicated unidirectionally and/or bidirectionally to and from any one of the components in system 3600 and a content provider via network 3660. Examples of content may include any media information including, for example, video, music, medical and gaming information, and so forth.

Content services device(s) 3630 may receive content such as cable television programming including media information, digital information, and/or other content. Examples of content providers may include any cable or satellite television or radio or Internet content providers. The provided examples are not meant to limit implementations in accordance with the present disclosure in any way.

In various implementations, platform 3602 may receive control signals from navigation controller 3650 having one or more navigation features. The navigation features of controller 3650 may be used to interact with user interface 3622, for example. In various embodiments, navigation controller 3650 may be a pointing device that may be a computer hardware component (specifically, a human interface device) that allows a user to input spatial (e.g., continuous and multi-dimensional) data into a computer. Many systems such as graphical user interfaces (GUI), and televisions and monitors allow the user to control and provide data to the computer or television using physical gestures.

Movements of the navigation features of controller 3650 may be replicated on a display (e.g., display 3620) by movements of a pointer, cursor, focus ring, or other visual indicators displayed on the display. For example, under the control of software applications 3616, the navigation features located on navigation controller 3650 may be mapped to virtual navigation features displayed on user interface 3622. In various embodiments, controller 3650 may not be a separate component but may be integrated into platform 3602 and/or display 3620. The present disclosure, however, is not limited to the elements or in the context shown or described herein.

In various implementations, drivers (not shown) may include technology to enable users to instantly turn on and off platform 3602 like a television with the touch of a button after initial boot-up, when enabled, for example. Program logic may allow platform 3602 to stream content to media adaptors or other content services device(s) 3630 or content delivery device(s) 3640 even when the platform is turned “off” In addition, chipset 3605 may include hardware and/or software support for 5.1 surround sound audio and/or high definition 7.1 surround sound audio, for example. Drivers may include a graphics driver for integrated graphics platforms. In various embodiments, the graphics driver may comprise a peripheral component interconnect (PCI) Express graphics card.

In various implementations, any one or more of the components shown in system 3600 may be integrated. For example, platform 3602 and content services device(s) 3630 may be integrated, or platform 3602 and content delivery device(s) 3640 may be integrated, or platform 3602, content services device(s) 3630, and content delivery device(s) 3640 may be integrated, for example. In various embodiments, platform 3602 and display 3620 may be an integrated unit. Display 3620 and content service device(s) 3630 may be integrated, or display 3620 and content delivery device(s) 3640 may be integrated, for example. These examples are not meant to limit the present disclosure.

In various embodiments, system 3600 may be implemented as a wireless system, a wired system, or a combination of both. When implemented as a wireless system, system 3600 may include components and interfaces suitable for communicating over a wireless shared media, such as one or more antennas, transmitters, receivers, transceivers, amplifiers, filters, control logic, and so forth. An example of wireless shared media may include portions of a wireless spectrum, such as the RF spectrum and so forth. When implemented as a wired system, system 3600 may include components and interfaces suitable for communicating over wired communications media, such as input/output (I/O) adapters, physical connectors to connect the I/O adapter with a corresponding wired communications medium, a network interface card (NIC), disc controller, video controller, audio controller, and the like. Examples of wired communications media may include a wire, cable, metal leads, printed circuit board (PCB), backplane, switch fabric, semiconductor material, twisted-pair wire, co-axial cable, fiber optics, and so forth.

Platform 3602 may establish one or more logical or physical channels to communicate information. The information may include media information and control information. Media information may refer to any data representing content meant for a user. Examples of content may include, for example, data from a voice conversation, videoconference, streaming video, electronic mail (“email”) message, voice mail message, alphanumeric symbols, graphics, image, video, text and so forth. Data from a voice conversation may be, for example, speech information, silence periods, background noise, comfort noise, tones and so forth. Control information may refer to any data representing commands, instructions or control words meant for an automated system. For example, control information may be used to route media information through a system, or instruct a node to process the media information in a predetermined manner. The implementations, however, are not limited to the elements or in the context shown or described in FIG. 36.

As described above, system 3600 may be embodied in varying physical styles or form factors. FIG. 37 illustrates implementations of a small form factor device 3700 in which system 3700 may be embodied. In various embodiments, for example, device 3700 may be implemented as a mobile computing device a having wireless capabilities. A mobile computing device may refer to any device having a processing system and a mobile power source or supply, such as one or more batteries, for example.

As described above, examples of a mobile computing device may include a personal computer (PC), laptop computer, ultra-laptop computer, tablet, touch pad, portable computer, handheld computer, palmtop computer, personal digital assistant (PDA), cellular telephone, combination cellular telephone/PDA, television, smart device (e.g., smart phone, smart tablet or smart television), mobile internet device (MID), messaging device, data communication device, cameras (e.g. point-and-shoot cameras, super-zoom cameras, digital single-lens reflex (DSLR) cameras), and so forth.

Examples of a mobile computing device also may include computers that are arranged to be worn by a person, such as a wrist computer, finger computer, ring computer, eyeglass computer, belt-clip computer, arm-band computer, shoe computers, clothing computers, and other wearable computers. In various embodiments, for example, a mobile computing device may be implemented as a smart phone capable of executing computer applications, as well as voice communications and/or data communications. Although some embodiments may be described with a mobile computing device implemented as a smart phone by way of example, it may be appreciated that other embodiments may be implemented using other wireless mobile computing devices as well. The embodiments are not limited in this context.

As shown in FIG. 37, device 3700 may include a housing 3702, a display 3704 which may include a user interface 3710, an input/output (I/O) device 3706, and an antenna 3708. Device 3700 also may include navigation features 3712. Display 3704 may include any suitable display unit for displaying information appropriate for a mobile computing device. I/O device 3706 may include any suitable I/O device for entering information into a mobile computing device. Examples for I/O device 3706 may include an alphanumeric keyboard, a numeric keypad, a touch pad, input keys, buttons, switches, rocker switches, microphones, speakers, voice recognition device and software, and so forth. Information also may be entered into device 3700 by way of microphone (not shown). Such information may be digitized by a voice recognition device (not shown). The embodiments are not limited in this context.

While implementation of the example processes herein may include the undertaking of all operations shown in the order illustrated, the present disclosure is not limited in this regard and, in various examples, implementation of the example processes herein may include the undertaking of only a subset of the operations shown and/or in a different order than illustrated.

In addition, any one or more of the operations discussed herein may be undertaken in response to instructions provided by one or more computer program products. Such program products may include signal bearing media providing instructions that, when executed by, for example, a processor, may provide the functionality described herein. The computer program products may be provided in any form of one or more machine-readable media. Thus, for example, a processor including one or more processor core(s) may undertake one or more of the operations of the example processes herein in response to program code and/or instructions or instruction sets conveyed to the processor by one or more machine-readable media. In general, a machine-readable medium may convey software in the form of program code and/or instructions or instruction sets that may cause any of the devices and/or systems described herein to implement at least portions of the video systems as discussed herein.

As used in any implementation described herein, the term “module” refers to any combination of software logic, firmware logic and/or hardware logic configured to provide the functionality described herein. The software may be embodied as a software package, code and/or instruction set or instructions, and “hardware”, as used in any implementation described herein, may include, for example, singly or in any combination, hardwired circuitry, programmable circuitry, state machine circuitry, and/or firmware that stores instructions executed by programmable circuitry. The modules may, collectively or individually, be embodied as circuitry that forms part of a larger system, for example, an integrated circuit (IC), system on-chip (SoC), and so forth. For example, a module may be embodied in logic circuitry for the implementation via software, firmware, or hardware of the coding systems discussed herein.

Various embodiments may be implemented using hardware elements, software elements, or a combination of both. Examples of hardware elements may include processors, microprocessors, circuits, circuit elements (e.g., transistors, resistors, capacitors, inductors, and so forth), integrated circuits, application specific integrated circuits (ASIC), programmable logic devices (PLD), digital signal processors (DSP), field programmable gate array (FPGA), logic gates, registers, semiconductor device, chips, microchips, chip sets, and so forth. Examples of software may include software components, programs, applications, computer programs, application programs, system programs, machine programs, operating system software, middleware, firmware, software modules, routines, subroutines, functions, methods, procedures, software interfaces, application program interfaces (API), instruction sets, computing code, computer code, code segments, computer code segments, words, values, symbols, or any combination thereof. Determining whether an embodiment is implemented using hardware elements and/or software elements may vary in accordance with any number of factors, such as desired computational rate, power levels, heat tolerances, processing cycle budget, input data rates, output data rates, memory resources, data bus speeds and other design or performance constraints.

One or more aspects of at least one embodiment may be implemented by representative instructions stored on a machine-readable medium which represents various logic within the processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. Such representations, known as “IP cores” may be stored on a tangible, machine readable medium and supplied to various customers or manufacturing facilities to load into the fabrication machines that actually make the logic or processor.

While certain features set forth herein have been described with reference to various implementations, this description is not intended to be construed in a limiting sense. Hence, various modifications of the implementations described herein, as well as other implementations, which are apparent to persons skilled in the art to which the present disclosure pertains are deemed to lie within the spirit and scope of the present disclosure.

The following examples pertain to further implementations. In one example, a computer-implemented method for video coding comprises obtaining frames of pixel data that have a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame. The method may include selecting a partition pattern where each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame. The method also may include determining brightness gain compensation values for the reference frame by providing a gain value and an offset value for individual partitions. The method also may include applying locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.

By another approach, the computer-implemented method also may comprise each partition having an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition. The partition pattern may be selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition. Multiple partitions may be tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients. The method also may comprise determining which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for:

J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$

and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value. The partition pattern may be selected from an index of predetermined partition patterns, where the index comprises index numbers each associated with a different pattern, and where some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions.

The partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels. The gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits, and where a quantization index number is quantized rather than the actual gain or offset value. A pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder, and where only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation.

The method also may comprise calculating motion compensation after the gain compensation is applied, and where total gain compensation is S_(t)=a(S_(t-1))+b, and the gain a is calculated using at least one of:

(A) a moment method as:

$a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}$

where E is the expectation operator, S_(t) is the brightness value of pixel (i,j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i,j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and

(B) a mean square error gradient minimization method as:

$a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$

where offset b is calculated as:

b=E(s _(t)(i,j))−a×E(s _(t-k)(i,j))

wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels;

The method also may comprise calculating averaged block pixel values of individual blocks of a frame, and adding up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions, and where the blocks are 4×4 pixels, and the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block. The partitions are gain partitions defined independently of prediction partitions and coding partitions.

By another approach, the current frame is an F-picture that provides the option to use a past frame, a future frame or both as a reference, and provides the option to use modified reference frames that are modified by morphing or synthesis wherein gain compensation is one or a plurality of morphing options.

By another example, a computer implemented method of video coding comprises performing compensation of inter-frame changes in brightness which comprises calculating multiple sets of parameters where each set comprises a gain value and an offset value for a portion of a frame, and calculated by using brightness of pixels of a current frame and a reference frame. The method also comprises transmitting the sets of parameters and an indication of which portion of the frame corresponds to which parameters to a decoder. The method including using the parameters to form a modified reference frame that is lower in error than the original reference frame.

By yet another example, a coder comprises an image buffer, and a graphics processing unit configured to obtain frames of pixel data and having a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame; select a partition pattern wherein each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame; determine brightness gain compensation values for the reference frame by providing a gain value and an offset value for individual partitions; and apply locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.

By a further example, the graphics processing unit may comprise each partition having an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition. The partition pattern may be selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition. Multiple partitions may be tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients. The method also may comprise determining which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for:

J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$

and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value. The partition pattern may be selected from an index of predetermined partition patterns, where the index comprises index numbers each associated with a different pattern, and where some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions.

The partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels. The gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits, and where a quantization index number is quantized rather than the actual gain or offset value. A pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder, and where only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation.

The graphics processing also may be configured to calculate motion compensation after the gain compensation is applied, and where total gain compensation is S_(t)=a(S_(t-1)) b, and the gain a is calculated using at least one of:

(A) a moment method as:

$a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}$

where E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and

(B) a mean square error gradient minimization method as:

$a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$

where offset b is calculated as:

b=E(s _(t)(i,j)−a×E(s _(t-k)(i,j))

wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels;

The graphics processing also may be configured to calculate averaged block pixel values of individual blocks of a frame, and add up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions, and where the blocks are 4×4 pixels, and the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block. The partitions are gain partitions defined independently of prediction partitions and coding partitions.

By another approach, at least one computer readable memory comprises instructions, that when executed by a computing device, cause the computing device to obtain frames of pixel data and that have a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame; select a partition pattern wherein each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame; determine brightness gain compensation values for the reference frame and by providing a gain value and an offset value for individual partitions; and apply locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.

By yet another example, the instructions causing the computing device to provide each partition having an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition. The partition pattern may be selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition. Multiple partitions may be tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients. The instructions causing the computing device to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for:

J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$

and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value. The partition pattern may be selected from an index of predetermined partition patterns, where the index comprises index numbers each associated with a different pattern, and where some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions.

The partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels. The gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits, and where a quantization index number is quantized rather than the actual gain or offset value. A pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder, and where only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation.

The instructions causing the computing device to calculate motion compensation after the gain compensation is applied, and where total gain compensation is S_(t)=a(S_(t-1)) b, and the gain a is calculated using at least one of:

(A) a moment method as:

$a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}$

where E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and

(B) a mean square error gradient minimization method as:

$a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$

where offset b is calculated as:

b=E(s _(t)(i,j))−a×E(s _(t-k)(i,j))

wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels;

The instructions causing the computing device to calculate averaged block pixel values of individual blocks of a frame, and adding up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions, and where the blocks are 4×4 pixels, and the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block. The partitions are gain partitions defined independently of prediction partitions and coding partitions.

In a further example, at least one machine readable medium may include a plurality of instructions that in response to being executed on a computing device, causes the computing device to perform the method according to any one of the above examples.

In a still further example, an apparatus may include means for performing the methods according to any one of the above examples.

The above examples may include specific combination of features. However, such the above examples are not limited in this regard and, in various implementations, the above examples may include the undertaking only a subset of such features, undertaking a different order of such features, undertaking a different combination of such features, and/or undertaking additional features than those features explicitly listed. For example, all features described with respect to the example methods may be implemented with respect to the example apparatus, the example systems, and/or the example articles, and vice versa. 

1-29. (canceled)
 30. A computer-implemented method for video coding, comprising: obtaining frames of pixel data and having a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame; selecting a partition pattern wherein each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame; determining brightness gain compensation values for the reference frame by providing a gain value and an offset value for individual partitions; and applying locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.
 31. The method of claim 30 wherein each partition has an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition.
 32. The method of claim 30 wherein the partition pattern is selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition.
 33. The method of claim 30 wherein multiple partitions are tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients.
 34. The method of claim 30 comprising determining which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for: J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$ and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value.
 35. The method of claim 30 wherein the partition pattern is selected from an index of predetermined partition patterns.
 36. The method of claim 35 wherein the index comprises index numbers each associated with a different pattern, and wherein some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions.
 37. The method of claim 30 wherein the partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels.
 38. The method of claim 30 wherein the gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits; wherein a quantization index number is quantized rather than the actual gain or offset value; wherein a pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder; and wherein only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation.
 39. The method of claim 30 wherein total gain compensation is S_(t)=a(S_(t-1))+b, and wherein the gain a is calculated using at least one of: (A) a moment method as: $a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}$ wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and (B) a mean square error gradient minimization method as: $a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$ wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame; and wherein offset b is calculated as: b=E(st(i,j))−a×E(st−k(i,j)) wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels.
 40. The method of claim 30 comprising: calculating averaged block pixel values of individual blocks of a frame; and adding up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions.
 41. The method of claim 40 wherein the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block.
 42. The method of claim 30 wherein the partitions are gain partitions defined independently of prediction partitions and coding partitions.
 43. The method of claim 30 wherein the current frame is an F-picture that provides the option to use a past frame, a future frame or both as a reference, and provides the option to use modified reference frames that are modified by morphing or synthesis wherein gain compensation is one or a plurality of morphing options.
 44. The method of claim 30 wherein each partition has an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition; wherein the partition pattern is selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition; wherein multiple partitions are tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients; the method comprising determining which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for: J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$ and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value; wherein the partition pattern is selected from an index of predetermined partition patterns. wherein the index comprises index numbers each associated with a different pattern, and wherein some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions; wherein the partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels; wherein the gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits; wherein a quantization index number is quantized rather than the actual gain or offset value; wherein a pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder; wherein only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation; the method comprising calculating motion compensation after the gain compensation is applied; wherein total gain compensation is S_(t)=a(S_(t-1))+b, and wherein the gain a is calculated using at least one of: (A) a moment method as: $a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}$ wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and (B) a mean square error gradient minimization method as: $a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$ wherein offset b is calculated as: b=E(st(i,j))−a×E(st−k(i,j)) wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels; the method comprising calculating averaged block pixel values of individual blocks of a frame, and adding up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions; wherein the blocks are 4×4 pixels; wherein the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block; and wherein the partitions are gain partitions defined independently of prediction partitions and coding partitions.
 45. A computer implemented method of video coding comprising: performing compensation of inter-frame changes in brightness comprising: calculating multiple sets of parameters wherein each set comprises a gain value and an offset value for a portion of a frame, and calculated by using brightness of pixels of a current frame and a reference frame; transmitting the sets of parameters and an indication of which portion of the frame corresponds to which parameters to a decoder; and using the parameters to form a modified reference frame that is lower in error than the original reference frame.
 46. A coder comprising: an image buffer; and a graphics processing unit configured to: obtain frames of pixel data and having a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame; select a partition pattern wherein each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame; determine brightness gain compensation values for the reference frame by providing a gain value and an offset value for individual partitions; and apply locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.
 47. The coder of claim 46 wherein each partition has an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition; wherein the partition pattern is selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition; wherein multiple partitions are tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients; the graphics processing unit being configured to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for: J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$ and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value; wherein the partition pattern is selected from an index of predetermined partition patterns. wherein the index comprises index numbers each associated with a different pattern, and wherein some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions; wherein the partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels; wherein the gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits; wherein a quantization index number is quantized rather than the actual gain or offset value; wherein a pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder; wherein only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation; the graphics processing unit being configured to calculate motion compensation after the gain compensation is applied; wherein total gain compensation is S_(t)=a(S_(t-1))+b, and wherein the gain a is calculated using at least one of: (A) a moment method as: $a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}$ wherein E is the expectation operator, S_(t) is the brightness value of pixel (i,j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i,j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and (B) a mean square error gradient minimization method as: $a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$ wherein offset b is calculated as: b=E(st(i,j))−a×E(st−k(i,j)) wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels; the graphics processing unit being configured to calculate averaged block pixel values of individual blocks of a frame, and add up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions; wherein the blocks are 4×4 pixels; wherein the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block; and wherein the partitions are gain partitions defined independently of prediction partitions and coding partitions.
 48. At least one computer readable memory comprising instructions, that when executed by a computing device, cause the computing device to: obtain frames of pixel data and having a current frame and a decoded reference frame to use as a motion compensation reference frame for the current frame; select a partition pattern wherein each partition is associated with more than one pixel and among patterns that use a varying number or varying arrangement or both of partitions to form a frame; and determine brightness gain compensation values for the reference frame and by providing a gain value and an offset value for individual partitions; and apply locally adaptive gain compensation by adjusting the brightness of a partition of the reference frame and adjusted by the gain compensation value so that multiple gain compensation values are provided for a single frame and depend on the location of the partition within the frame.
 49. The computer readable medium of claim 48 wherein each partition has an average gain value and an average offset value based on, at least in part, an average of pixel values in the partition; wherein the partition pattern is selected by using at least one of: rate distortion optimization (RDO), and a method that balances quality of image with bit cost for using a particular partition; wherein multiple partitions are tested to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate associated with the gain and offset values, and the quantizer used for transform coefficients; the instructions causing the computing device to determine which partition results in a best balance of quality and bit cost, and based, at least in part, on minimizing J for: J = D + λ × R where $\lambda = \sqrt{c \times \left( \frac{Q}{2} \right)^{2}}$ and where D is a distortion between a partition on the current frame and the corresponding partition on the reference frame, a bitrate R is associated with the gain and offset values, and λ is a langrangian multiplier where Q is the quantizer used for transform coefficients, and c is a constant found by heuristics and set at 0.7 as a middle value; wherein the partition pattern is selected from an index of predetermined partition patterns. wherein the index comprises index numbers each associated with a different pattern, and wherein some of the index numbers indicate the number of partitions in a corresponding pattern, and some index numbers indicate the size of the partitions in a corresponding pattern without expressly stating the number of partitions; wherein the partition pattern is selected separately from any partition formed for prediction blocks and for partitions formed for transform coding and quantization of chroma and luma values in the image data of the pixels; wherein the gain and offset values are quantized for transmission from an encoder and by using a predetermined index with a fixed number of intervals to maintain the transmission of the gain and offset values to a predetermined number of bits; wherein a quantization index number is quantized rather than the actual gain or offset value; wherein a pattern indicator, a gain indicator for each partition, and offset indicator for each partition are limited to seven, eight, and eight bits respectively to transmit the indication of the gain compensation for a frame from an encoder; wherein only the parameter index number and quantized gain value(s) and quantized offset value(s) are transmitted from an encoder to reconstruct the gain compensation; the instructions causing the computing device to calculate motion compensation after the gain compensation is applied; wherein total gain compensation is S_(t)=a(S_(t-1))+b, and wherein the gain a is calculated using at least one of: (A) a moment method as: ${a = \frac{\sqrt{\left( {{E\left( {S_{t}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}{\sqrt{\left( {{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - \left( {E\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)^{2}} \right.}}},$ and (B) a mean square error gradient minimization method as: $a = \frac{{E\left( {{S_{t}\left( {i,j} \right)}\left( {S_{t - k}\left( {i,j} \right)} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}{{E\left( {S_{t - k}^{2}\left( {i,j} \right)} \right)} - {{E\left( {S_{t}\left( {i,j} \right)} \right)}{E\left( {S_{t - k}\left( {i,j} \right)} \right)}}}$ wherein offset b is calculated as: b=E(st(i,j))−a×E(st−k(i,j)) wherein E is the expectation operator, S_(t) is the brightness value of pixel (i, j) of the current frame t, S_(t-1) is the brightness value of a corresponding pixel (i, j) of the reference frame t−k that is selected to be used as a reference frame for the current frame, and wherein a is the gain value between the two corresponding pixels; the instructions causing the computing device to calculate averaged block pixel values of individual blocks of a frame, and add up the block values of different blocks to determine sums for calculating the gain and offset values for different partitions; wherein the blocks are 4×4 pixels; wherein the averaged block pixel values include at least one of: (1) the average of the pixel brightness values within the block, (2) the average of the square of the pixel brightness within the block, and (3) the average of the products (by multiplication) of corresponding pixel brightness values in the current and reference frames, and within the block; and wherein the partitions are gain partitions defined independently of prediction partitions and coding partitions. 